51 #if (D4D_BMP_EXTSRC_SUPPORT_BMP == D4D_TRUE) && (D4D_EXTSRC_FILE_ENABLE == D4D_TRUE)
76 LWord dataIx, dataBuffIx, i;
79 #if D4D_ROUND_CORNER_ENABLE != D4D_FALSE
84 pFile = D4D_OpenImgFile(pFileName,
"r");
130 #if D4D_ENDIAN == D4D_ENDIAN_BIG
146 if(bitmapInfo.
width < 0)
147 bitmapInfo.
width *= -1;
203 if(pPalleteBgra ==
NULL)
211 if(
D4D_FileRead(pFile, pPalleteBgra, palleteSize) != palleteSize)
223 for(i = 0; i < bitmapInfo.
ncolors; i++)
225 c = pPalleteBgra[i].
Red + pPalleteBgra[i].
Green + pPalleteBgra[i].
Blue;
228 pPalleteBgra[i].
Red = c;
229 pPalleteBgra[i].
Green = c;
230 pPalleteBgra[i].
Blue = c;
268 dataLineLength = (int)((((bitmapInfo.
width * bitmapInfo.
bitspp) / 8) + 3) & ~3);
271 for(locY=0; locY < bitmapInfo.
height; locY++)
273 #if D4D_ROUND_CORNER_ENABLE != D4D_FALSE
276 else if((bitmapInfo.
height - 1 - locY) < radius)
283 #if D4D_ROUND_CORNER_ENABLE != D4D_FALSE
304 for(locX=0; locX < bitmapInfo.
width; locX++)
306 #if D4D_ROUND_CORNER_ENABLE != D4D_FALSE
310 if((locX < non_print_len) || ((bitmapInfo.
width - 1 - locX) < non_print_len))
316 if(dataBuffIx + (bitmapInfo.
bitspp / 8) > dataLoadedCnt )
332 dataLoadedCnt = (dataLineLength - dataIx);
363 if(locX < bitmapInfo.
width)
365 #if D4D_ROUND_CORNER_ENABLE != D4D_FALSE
369 color =
D4D_COLOR_RGB(pPalleteBgra[(i & 0x80)? 1:0].Red, pPalleteBgra[(i & 0x80)? 1:0].Green, pPalleteBgra[(i & 0x80)? 1:0].Blue);
376 #if D4D_ROUND_CORNER_ENABLE != D4D_FALSE
380 if((locX < non_print_len) || ((bitmapInfo.
width - 1 - locX) < non_print_len))
400 #if D4D_ROUND_CORNER_ENABLE != D4D_FALSE
414 #if D4D_ROUND_CORNER_ENABLE != D4D_FALSE
418 if((locX < non_print_len) || ((bitmapInfo.
width - 1 - locX) < non_print_len))
422 if(locX < bitmapInfo.
width)
424 #if D4D_ROUND_CORNER_ENABLE != D4D_FALSE
446 #if D4D_ROUND_CORNER_ENABLE != D4D_FALSE
462 #if D4D_ROUND_CORNER_ENABLE != D4D_FALSE
481 #if D4D_ROUND_CORNER_ENABLE != D4D_FALSE
500 #if D4D_ROUND_CORNER_ENABLE != D4D_FALSE
536 locY = y + bitmapInfo.
height - 1;
538 #if D4D_ROUND_CORNER_ENABLE != D4D_FALSE
555 #if D4D_ROUND_CORNER_ENABLE != D4D_FALSE
556 if(x1 < x + non_print_len)
557 x1 = x + non_print_len;
559 if(x2 > (x + bitmapInfo.
width - 1 - non_print_len))
560 x2 = (x + bitmapInfo.
width - 1 - non_print_len);
568 for(i=0;i<(x2-x1);i++)
592 #if D4D_ROUND_CORNER_ENABLE != D4D_FALSE
593 if((locY - y) < radius)
595 else if((bitmapInfo.
height - 1 - (locY - y)) < radius)
625 #if D4D_ROUND_CORNER_ENABLE != D4D_FALSE
626 if((locY - y) < radius)
628 else if((bitmapInfo.
height - 1 - (locY - y)) < radius)
651 #if D4D_ROUND_CORNER_ENABLE != D4D_FALSE
655 if((locX < non_print_len + x) || ((bitmapInfo.
width - 1 - (locX - x)) < non_print_len))
662 color =
D4D_COLOR_RGB(pPalleteBgra[d4d_extsrcBuffer[COLOR]].Red, pPalleteBgra[d4d_extsrcBuffer[COLOR]].Green, pPalleteBgra[d4d_extsrcBuffer[COLOR]].Blue);
670 if(dataOffset & 0x01)
701 #if D4D_ROUND_CORNER_ENABLE != D4D_FALSE
715 #if D4D_LLD_FLUSH_ELEMENT != D4D_FALSE
764 if(bitmapInfo.
width < 0)
765 bitmapInfo.
width *= -1;
792 pFile = D4D_OpenImgFile(pFileName,
"r");
832 #if D4D_ENDIAN == D4D_ENDIAN_BIG
864 #if D4D_EXTSRC_BUFF_SIZE < 64
884 pFile = D4D_OpenImgFile(pFileName,
"w");
931 for(y = 0; y < y_max; y++)
935 for(x = 0; x < x_max; x++)
struct D4D_LONG_S::@2 Bytes
void D4D_RBoxXY(D4D_COOR x1, D4D_COOR y1, D4D_COOR x2, D4D_COOR y2, D4D_LINETYPE ltype, D4D_COLOR colorLine, D4D_COLOR colorFill, D4D_COOR radius)
Function draw filled rectangle with outline on the screen with round corners.
#define D4D_MemAlloc(size)
Mem Alloc eGUI definition. If not defined by user config any special user function, it used standard system function.
#define D4D_COLOR_GET_B(color)
D4D_COLOR(* D4DLCD_Read_PixelColor)(void)
The LCD driver read pixel function. The pixels will be read on position (automaticaly incremented) se...
void(* D4DLCD_FlushBuffer)(D4DLCD_FLUSH_MODE mode)
The LCD driver flush function.
#define D4D_TMP_PBITMAPHEADER
#define D4D_BITMAPINFOHEADER_SIZE
#define D4D_READ32L(x)
Macro for handling endianism - read 32bit - from Little Endian.
#define D4D_FALSE
This is definition of boolean operation value in eGUI - FALSE.
#define D4D_SCREEN_SIZE_LONGER_SIDE
This macro is used to define the size of longer side of LCD. If not defined, the longer side is set t...
#define D4D_COLOR_RGB(R, G, B)
#define D4D_READ16L(x)
Macro for handling endianism - read 16bit - from Little Endian.
The flush after one basic element is draw.
D4D_COOR D4D_ImgDecBmpGetWidth(D4D_CHAR *pFileName)
#define D4D_TRUE
This is definition of boolean operation value in eGUI - TRUE.
void D4D_ImgDecBmpDraw(D4D_COOR x, D4D_COOR y, D4D_CHAR *pFileName, D4D_BOOL greyScale, D4D_COOR radius)
D4D Driver main header file.
const D4D_SIZE d4d_size_zero
D4D Driver private header file.
Portrait up side down orientation.
D4D_COOR cx
Size in axis X (width)
#define D4D_BITMAP_SIGNATURE
Byte D4D_COOR
Type definition of eGUI coordination variables.
#define D4D_COLOR_RGB555_GET_B(color)
The macro gets the Blue component from 15-bit RGB555 format to 8-bit component format.
static void D4D_PrintPixel(D4D_COLOR color, D4D_BOOL greyScale)
#define D4D_WRITE16L(x)
Macro for handling endianism - write 16bit - from Little Endian.
D4D_CLR_SCHEME * D4D_ScreenGetScheme(D4D_SCREEN *pScreen)
#define D4D_BITMAPHEADER_SIZE
D4D_COOR D4D_ImgDecBmpGetHeight(D4D_CHAR *pFileName)
D4D_ORIENTATION D4D_LCD_GetOrientation(void)
#define D4D_EXTSRC_BUFF_SIZE
This macro is used to specify size of buffer that is using when external file support is enabled...
void D4D_LCD_PutPixel(D4D_COOR x1, D4D_COOR y1, D4D_LINETYPE line_type, D4D_COLOR color)
#define NULL
Type definition of null pointer.
D4D_SIZE D4D_ImgDecBmpGetSize(D4D_CHAR *pFileName)
#define D4D_MemFree(pMem)
Mem Free eGUI definition. If not defined by user config any special user function, it used standard system function.
void D4D_BoxXY(D4D_COOR x1, D4D_COOR y1, D4D_COOR x2, D4D_COOR y2, D4D_LINETYPE ltype, D4D_COLOR colorLine, D4D_COLOR colorFill)
Function draw filled rectangle with outline on the screen.
unsigned long LWord
Type definition of LWord (unsigned 32-bit).
D4D_SCREEN * D4D_GetActiveScreen(void)
Returns pointer to current active screen.
D4D driver external bmp files decoder header file.
int D4D_ImgDecBmpGetHeader(D4D_CHAR *pFileName, void *pBuff, int max_size)
D4D_COOR D4D_RndCornerGetNonPrintedPxl(D4D_COOR radius, D4D_COOR line)
Function that counts number of printed pixels in specified line of circle quadrant.
#define D4D_FileWrite
Macro used as short cut to used File Write function defined by D4D_DECLARE_FILE_FUNCTIONS.
#define D4D_SCREEN_SIZE_SHORTER_SIDE
This macro is used to define the size of shorter side of LCD. If not defined, the shorter side is set...
struct D4D_LONG_S::@1 Words
#define D4D_SEEK_SET
D4D_SEEK_SET eGUI Origin constant for begin of file (1)
D4D_COOR cy
Size in axis Y (height)
#define D4D_SEEK_CUR
D4D_SEEK_CUR eGUI Origin constant for current position of file (2)
#define D4D_FileClose
Macro used as short cut to used File Close function defined by D4D_DECLARE_FILE_FUNCTIONS.
const D4DLCD_FUNCTIONS D4D_LLD_LCD
LWord D4D_BOOL
Type definition of eGUI boolean.
#define D4D_UNUSED(x)
Macro used just for notify compiler that the input parameter is not used.
char D4D_CHAR
Type definition of eGUI ASCII character.
Type definition of eGUI size structure.
#define D4D_COLOR_GET_G(color)
struct D4D_BGRA_S D4D_BGRA
#define D4D_FileSeek
Macro used as short cut to used File Seek function defined by D4D_DECLARE_FILE_FUNCTIONS.
#define D4D_WRITE32L(x)
Macro for handling endianism - write 32bit - from Little Endian.
#define D4D_COLOR_RGB555_GET_R(color)
The macro gets the Red component from 15-bit RGB555 format to 8-bit component format.
Byte d4d_extsrcBuffer[D4D_EXTSRC_BUFF_SIZE]
D4D driver - resistive touch screen driver function header file.
void(* D4DLCD_Send_PixelColor)(D4D_COLOR value)
The LCD driver send pixel function. The pixels will be draw on position (automaticaly incremented) se...
#define D4D_COLOR_RGB555_GET_G(color)
The macro gets the Green component from 15-bit RGB555 format to 8-bit component format.
LWord D4D_COLOR
Type definition of eGUI color variables.
D4D_COLOR D4D_GetGreyScale(D4D_COLOR color)
Compute the grayscale color.
D4D_BOOL D4D_PrintScreenToBMP(D4D_CHAR *pFileName)
The function convert screen into BMP file.
unsigned short Word
Type definition of Word (unsigned 16-bit).
void * D4D_FILEPTR
Type definition of eGUI file pointer.
#define D4D_COLOR_GET_R(color)
#define D4D_FileRead
Macro used as short cut to used File Read function defined by D4D_DECLARE_FILE_FUNCTIONS.
unsigned char(* D4DLCD_SetWindow)(unsigned short x1, unsigned short y1, unsigned short x2, unsigned short y2)
The LCD driver Set logic window function. Into this logic window will be draw pixels.