eGUI alias D4D  Release 3.0
Reference Manual
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
d4d_bmp.c
Go to the documentation of this file.
1 /**************************************************************************
2 *
3 * Copyright 2014 by Petr Gargulak. eGUI Community.
4 * Copyright 2009-2013 by Petr Gargulak. Freescale Semiconductor, Inc.
5 *
6 ***************************************************************************
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License Version 3
9 * or later (the "LGPL").
10 *
11 * As a special exception, the copyright holders of the eGUI project give you
12 * permission to link the eGUI sources with independent modules to produce an
13 * executable, regardless of the license terms of these independent modules,
14 * and to copy and distribute the resulting executable under terms of your
15 * choice, provided that you also meet, for each linked independent module,
16 * the terms and conditions of the license of that module.
17 * An independent module is a module which is not derived from or based
18 * on this library.
19 * If you modify the eGUI sources, you may extend this exception
20 * to your version of the eGUI sources, but you are not obligated
21 * to do so. If you do not wish to do so, delete this
22 * exception statement from your version.
23 *
24 * This program is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
27 *
28 * You should have received a copy of the GNU General Public License
29 * and the GNU Lesser General Public License along with this program.
30 * If not, see <http://www.gnu.org/licenses/>.
31 *
32 ***************************************************************************/
46 #include "d4d.h"
49 
50 #if D4D_EXTSRC_FILE_ENABLE != D4D_FALSE
51  static const D4D_CHAR imgDfltPath[] = D4D_IMG_WORK_PATH_DEFAULT;
52  static D4D_CHAR* pImgWorkPath = (D4D_CHAR*)imgDfltPath;
53 #endif
54 
56 {
57  { NULL, NULL, NULL, NULL, NULL },
61 };
62 
64 {
65  NULL,
66  NULL
67 };
68 
69 /******************************************************************************
70 * Begin of D4D_BMP public functions
71 */
75 /**************************************************************/
81 #if D4D_EXTSRC_FILE_ENABLE != D4D_FALSE
82  /**************************************************************************/
89  void D4D_ExtImgSetWorkPath(D4D_CHAR* pPath)
90  {
91  if(pPath)
92  pImgWorkPath = pPath;
93  }
94 
95  /**************************************************************************/
101  D4D_CHAR* D4D_ExtImgGetWorkPath(void)
102  {
103  return pImgWorkPath;
104  }
105 
106  /**************************************************************************/
114  D4D_FILEPTR D4D_OpenImgFile(D4D_CHAR* pFileName, D4D_CHAR* mode)
115  {
116  // create the file name (if needed)
117  if(D4D_FileIsAbsolutePath(pFileName))
118  {
119  // the input path is absolute and can't be changed
120  return D4D_FileOpen(pFileName,mode);
121  }
122  else
123  {
124  // the input path is relative and must be updated with preselected image work paths
125  if((D4D_StrLen(pImgWorkPath) + D4D_StrLen(pFileName)) >= D4D_EXTSRC_BUFF_SIZE)
126  return NULL;
127 
128  D4D_StrCopy((D4D_CHAR*)d4d_extsrcBuffer, pImgWorkPath);
129  D4D_StrCat((D4D_CHAR*)d4d_extsrcBuffer, pFileName);
130  return D4D_FileOpen((D4D_CHAR*)d4d_extsrcBuffer,mode);
131  }
132 
133  }
134 #endif
135 
136 /**************************************************************************/
144 {
145  if(pBmp == NULL)
146  return D4D_EXTIMG_UNKNOWN;
147 
148  #if D4D_EXTSRC_FILE_ENABLE != D4D_FALSE
149  if(pBmp->pData == NULL)
150  {
151  D4D_CHAR pExt[3+1];
152  D4D_CHAR* pExtSrc;
153 
154  // run the external data dekoder
155  if(pBmp->pParam == NULL)
156  return D4D_EXTIMG_UNKNOWN;
157 
158  // 1. get File extension
159  pExtSrc = D4D_GetFileExtension((D4D_CHAR*)pBmp->pParam);
160 
161  if(D4D_StrLen(pExtSrc) > 3)
162  return D4D_EXTIMG_UNKNOWN;
163 
164  D4D_StrCopy(pExt, pExtSrc);
165  // Convert extension to upper format
166  D4D_ToUpper(pExt);
167 
168  #if (D4D_BMP_EXTSRC_SUPPORT_D4D == D4D_TRUE) && (D4D_EXTSRC_FILE_ENABLE == D4D_TRUE)
169  if(!D4D_CompareStrings(pExt, D4D_BMP_EXTSRC_SUPPORT_D4D_EXT)) // big or little endian of the egui picture format
170  return D4D_EXTIMG_D4D; // d4d bitmap binary files
171  #endif
172 
173  #if (D4D_BMP_EXTSRC_SUPPORT_BMP == D4D_TRUE) && (D4D_EXTSRC_FILE_ENABLE == D4D_TRUE)
174  if(!D4D_CompareStrings(pExt, "BMP"))
175  return D4D_EXTIMG_BMP; // standard bitmap BMP files
176  #endif
177 
178  }else
179 
180  #endif
181  if((pBmp->pData != NULL))
182  return D4D_EXTIMG_INTD4D;
183 
184  return D4D_EXTIMG_UNKNOWN;
185 }
186 
187 #ifdef __CWCC__
188  #pragma mark -
189  #pragma mark Interface Bitmap Functions
190  #pragma mark -
191 #endif
192 
193 
194 /**************************************************************************/
205 void D4D_DrawRBmpXY(D4D_COOR x, D4D_COOR y, const D4D_BMP* pBmp, D4D_BOOL greyScale, D4D_COOR radius)
206 {
207  D4D_EXTIMG_TYPE imgType = D4D_GetImgSrcType((D4D_BMP*)pBmp);
208 
209  if(imgType == D4D_EXTIMG_UNKNOWN)
210  return;
211 
212  if(imgType == D4D_EXTIMG_INTD4D)
213  {
214  if(d4d_extImgFunc[imgType].D4D_ImgDecDraw)
215  d4d_extImgFunc[imgType].D4D_ImgDecDraw(x, y, (D4D_CHAR*)pBmp, greyScale, radius);
216 
217  }
218 #if D4D_EXTSRC_FILE_ENABLE != D4D_FALSE
219  else
220  {
221  if(d4d_extImgFunc[imgType].D4D_ImgDecDraw)
222  d4d_extImgFunc[imgType].D4D_ImgDecDraw(x, y, (D4D_CHAR*)(pBmp->pParam), greyScale, radius);
223  }
224 #endif
225 }
226 
227 
228 /**************************************************************************/
240 void D4D_DrawBmpRect(D4D_POINT* ppt, D4D_SIZE* psz, const D4D_BMP* pBmp, D4D_BMP_PROPERTIES bmpProp, D4D_COLOR colorBkgd, D4D_BOOL greyScale)
241 {
242  D4D_SIZE tmp_size = *psz;
243  D4D_POINT tmp_pos = *ppt;
244 
245  D4D_COOR tmp_bmpWidth = (D4D_COOR)D4D_GetBmpWidth(pBmp);
246  D4D_COOR tmp_bmpHeight = (D4D_COOR)D4D_GetBmpHeight(pBmp);
247 
248  if(!tmp_size.cx)
249  tmp_size.cx = tmp_bmpWidth;
250 
251  if(!tmp_size.cy)
252  tmp_size.cy = tmp_bmpHeight;
253 
254  // If the bitmap is larger than specify place, don't draw it
255  if ((tmp_size.cy < tmp_bmpHeight) || (tmp_size.cx < tmp_bmpWidth))
256  {
257  D4D_FillRect(ppt, psz, colorBkgd);
258  return;
259  }
260 
261  tmp_pos.y = ppt->y;
262  tmp_pos.x = ppt->x;
263 
264  // Compute the text position in rectangle in Y axis
265  switch(bmpProp & D4D_ALIGN_V_MASK)
266  {
268  tmp_pos.y += (D4D_COOR)(tmp_size.cy - tmp_bmpHeight);
269  break;
270 
272  tmp_pos.y += (D4D_COOR)((tmp_size.cy - tmp_bmpHeight) / 2);
273  break;
274  }
275 
276  // Compute the text position in rectangle in X axis
277  switch(bmpProp & D4D_ALIGN_H_MASK)
278  {
280  tmp_pos.x += (D4D_COOR)(tmp_size.cx - tmp_bmpWidth);
281  break;
282 
284  tmp_pos.x += (D4D_COOR)((tmp_size.cx - tmp_bmpWidth) / 2);
285  break;
286  }
287 
288  if(tmp_size.cx > tmp_bmpWidth)
289  {
290  if((bmpProp & D4D_ALIGN_H_MASK) != D4D_ALIGN_H_LEFT_MASK)
291  {
292  // Fill the part of rect in front of the text in full height of rect
293  D4D_FillRectXY(ppt->x, ppt->y, tmp_pos.x, (D4D_COOR)(ppt->y + tmp_size.cy - 1), colorBkgd);
294  }
295 
296  if((bmpProp & D4D_ALIGN_H_MASK) != D4D_ALIGN_H_RIGHT_MASK)
297  {
298  // Fill the part of rect behind the text in full height of rect
299  D4D_FillRectXY((D4D_COOR)(tmp_pos.x + tmp_bmpWidth - 1), ppt->y, (D4D_COOR)(ppt->x + tmp_size.cx - 1), (D4D_COOR)(ppt->y + tmp_size.cy - 1), colorBkgd);
300  }
301  }
302 
303  if(tmp_size.cy > tmp_bmpHeight)
304  {
305  if((bmpProp & D4D_ALIGN_V_MASK) != D4D_ALIGN_V_TOP_MASK)
306  {
307  // Fill the part of rect above the text in lenght of text
308  D4D_FillRectXY(tmp_pos.x, ppt->y, (D4D_COOR)(tmp_pos.x + tmp_bmpWidth - 1), tmp_pos.y, colorBkgd);
309  }
310 
311  if((bmpProp & D4D_ALIGN_V_MASK) != D4D_ALIGN_V_BOTTOM_MASK)
312  {
313  // Fill the part of rect under the text in lenght of text
314  D4D_FillRectXY(tmp_pos.x, (D4D_COOR)(tmp_pos.y + tmp_bmpHeight - 1), (D4D_COOR)(tmp_pos.x + tmp_bmpWidth - 1), (D4D_COOR)(ppt->y + tmp_size.cy - 1), colorBkgd);
315  }
316  }
317 
318  // Print the string itself
319  D4D_DrawRBmpXY(tmp_pos.x, tmp_pos.y, pBmp, greyScale, 0); // radius, grayscale?
320 
321 
322 }
323 
324 #if D4D_ROUND_CORNER_ENABLE != D4D_FALSE
325 /**************************************************************************/
338 void D4D_DrawRBmpRect(D4D_POINT* ppt, D4D_SIZE* psz, const D4D_BMP* pBmp, D4D_BMP_PROPERTIES bmpProp, D4D_COLOR colorBkgd, D4D_BOOL greyScale, D4D_COOR radius)
339 {
340  D4D_POINT tmp_pos = *ppt;
341  D4D_SIZE tmp_size = *psz;
342 
343  D4D_COOR tmp_bmpWidth;
344  D4D_COOR tmp_bmpHeight;
345 
346  if(!radius)
347  {
348  D4D_DrawBmpRect(ppt, psz, pBmp, bmpProp, colorBkgd, greyScale);
349  return;
350  }
351 
352 
353  tmp_bmpWidth = (D4D_COOR)D4D_GetBmpWidth(pBmp);
354  tmp_bmpHeight = (D4D_COOR)D4D_GetBmpHeight(pBmp);
355 
356  // If the bitmap is larger than specify place, don't draw it
357  if ((tmp_size.cy < tmp_bmpHeight) || (tmp_size.cx < tmp_bmpWidth))
358  {
359  D4D_FillRect(ppt, psz, colorBkgd);
360  return;
361  }
362 
363 
364  // Compute the text position in rectangle in Y axis
365  switch(bmpProp & D4D_ALIGN_V_MASK)
366  {
368  tmp_pos.y = (D4D_COOR)(ppt->y + (tmp_size.cy - tmp_bmpHeight));
369  break;
370 
372  tmp_pos.y = (D4D_COOR)(ppt->y + ((tmp_size.cy - tmp_bmpHeight) / 2));
373  break;
374 
375  default:
377  tmp_pos.y = ppt->y;
378  break;
379  }
380 
381  // Compute the text position in rectangle in X axis
382  switch(bmpProp & D4D_ALIGN_H_MASK)
383  {
385  tmp_pos.x = (D4D_COOR)(ppt->x + (tmp_size.cx - tmp_bmpWidth));
386  break;
387 
389  tmp_pos.x = (D4D_COOR)(ppt->x + ((tmp_size.cx - tmp_bmpWidth) / 2));
390  break;
391 
392  default:
394  tmp_pos.x = ppt->x;
395  break;
396  }
397 
398 
399  // Fill the part of rect in front of the text in full height of rect
400  if((psz->cx != tmp_bmpWidth) || (psz->cy != tmp_bmpHeight))
401  D4D_FillRRect(ppt, psz, colorBkgd, radius);
402 
403  // Print the bmp itself
404  D4D_DrawRBmpXY(tmp_pos.x, tmp_pos.y, pBmp, greyScale, radius); // radius, grayscale?
405 
406 
407 }
408 
409 #endif
410 
411 /**************************************************************************/
419 {
420  D4D_EXTIMG_TYPE imgType = D4D_GetImgSrcType((D4D_BMP*)pBmp);
421 
422  if(imgType == D4D_EXTIMG_UNKNOWN)
423  return *(D4D_SIZE*)&d4d_size_zero;
424 
425  if(imgType == D4D_EXTIMG_INTD4D)
426  {
427  if(d4d_extImgFunc[imgType].D4D_ImgDecGetSize)
428  return d4d_extImgFunc[imgType].D4D_ImgDecGetSize((D4D_CHAR*)pBmp);
429 
430  }
431 #if D4D_EXTSRC_FILE_ENABLE != D4D_FALSE
432  else
433  {
434  if(d4d_extImgFunc[imgType].D4D_ImgDecGetSize)
435  return d4d_extImgFunc[imgType].D4D_ImgDecGetSize((D4D_CHAR*)(pBmp->pParam));
436  }
437 #endif
438 
439  return *(D4D_SIZE*)&d4d_size_zero;
440 
441 }
442 
443 /**************************************************************************/
451 {
452  D4D_EXTIMG_TYPE imgType = D4D_GetImgSrcType((D4D_BMP*)pBmp);
453 
454  if(imgType == D4D_EXTIMG_UNKNOWN)
455  return 0;
456 
457  if(imgType == D4D_EXTIMG_INTD4D)
458  {
459  if(d4d_extImgFunc[imgType].D4D_ImgDecGetWidth)
460  return d4d_extImgFunc[imgType].D4D_ImgDecGetWidth((D4D_CHAR*)pBmp);
461 
462  }
463 #if D4D_EXTSRC_FILE_ENABLE != D4D_FALSE
464  else
465  {
466  if(d4d_extImgFunc[imgType].D4D_ImgDecGetWidth)
467  return d4d_extImgFunc[imgType].D4D_ImgDecGetWidth((D4D_CHAR*)(pBmp->pParam));
468  }
469 #endif
470 
471  return 0;
472 }
473 
474 /**************************************************************************/
482 {
483  D4D_EXTIMG_TYPE imgType = D4D_GetImgSrcType((D4D_BMP*)pBmp);
484 
485  if(imgType == D4D_EXTIMG_UNKNOWN)
486  return 0;
487 
488  if(imgType == D4D_EXTIMG_INTD4D)
489  {
490  if(d4d_extImgFunc[imgType].D4D_ImgDecGetHeight)
491  return d4d_extImgFunc[imgType].D4D_ImgDecGetHeight((D4D_CHAR*)pBmp);
492 
493  }
494 #if D4D_EXTSRC_FILE_ENABLE != D4D_FALSE
495  else
496  {
497  if(d4d_extImgFunc[imgType].D4D_ImgDecGetHeight)
498  return d4d_extImgFunc[imgType].D4D_ImgDecGetHeight((D4D_CHAR*)(pBmp->pParam));
499  }
500 #endif
501 
502  return 0;
503 }
504 
505 
506 /**************************************************************************/
515 int D4D_GetBmpHeader(D4D_BMP* pBmp, void* pBuff, int max_size)
516 {
517  D4D_EXTIMG_TYPE imgType = D4D_GetImgSrcType((D4D_BMP*)pBmp);
518 
519  if(imgType == D4D_EXTIMG_INTD4D)
520  {
521  if(d4d_extImgFunc[imgType].D4D_ImgDecGetHeader)
522  return d4d_extImgFunc[imgType].D4D_ImgDecGetHeader((D4D_CHAR*)pBmp, pBuff, max_size);
523 
524  }
525 #if D4D_EXTSRC_FILE_ENABLE != D4D_FALSE
526  else
527  {
528  if(d4d_extImgFunc[imgType].D4D_ImgDecGetHeader)
529  return d4d_extImgFunc[imgType].D4D_ImgDecGetHeader((D4D_CHAR*)(pBmp->pParam), pBuff, max_size);
530  }
531 #endif
532 
533  return 0;
534 }
535 
536 
537 /******************************************************************************
538 * End of public functions */
540 /******************************************************************************/
541 
542 /******************************************************************************
543 * Private functions *
544 ******************************************************************************/
545 
546 
D4D_COOR D4D_ImgDecIntD4DGetHeight(D4D_CHAR *pFileName)
#define D4D_ALIGN_V_CENTER_MASK
The vertical center aligment option mask (for texts and also bitmaps).
Definition: d4d_base.h:234
D4D_CHAR * D4D_StrCopy(register D4D_CHAR *sd, register const D4D_CHAR *ss)
The function copy string one string to other one (terminated by zero)
Definition: d4d_extsrc.c:154
void D4D_FillRect(D4D_POINT *ppt, D4D_SIZE *psz, D4D_COLOR color)
Function draw filled rectangle on the screen.
const D4D_BMP d4d_mouseNoCursor
Definition: d4d_bmp.c:63
Type definition of eGUI point structure.
Definition: d4d_types.h:223
void D4D_ImgDecIntD4DDraw(D4D_COOR x, D4D_COOR y, D4D_CHAR *pFileName, D4D_BOOL greyScale, D4D_COOR radius)
void D4D_FillRectXY(D4D_COOR x1, D4D_COOR y1, D4D_COOR x2, D4D_COOR y2, D4D_COLOR color)
Function draw filled rectangle on the screen.
int D4D_GetBmpHeader(D4D_BMP *pBmp, void *pBuff, int max_size)
Function gets image file header.
Definition: d4d_bmp.c:515
#define D4D_ALIGN_H_RIGHT_MASK
The horizontal right aligment option mask (for texts and also bitmaps).
Definition: d4d_base.h:223
Byte D4D_BMP_PROPERTIES
D4D_BMP_PROPERTIES type of image properties.
Definition: d4d_bmp.h:117
D4D_COOR D4D_ImgDecExtD4DGetHeight(D4D_CHAR *pFileName)
D4D_COOR D4D_ImgDecBmpGetWidth(D4D_CHAR *pFileName)
void D4D_ImgDecBmpDraw(D4D_COOR x, D4D_COOR y, D4D_CHAR *pFileName, D4D_BOOL greyScale, D4D_COOR radius)
External memory eGUI format of image.
Definition: d4d_bmp.h:94
D4D_COOR D4D_ImgDecIntD4DGetWidth(D4D_CHAR *pFileName)
D4D Driver main header file.
D4D_CHAR * D4D_GetFileExtension(D4D_CHAR *pFileName)
D4D_COOR D4D_GetBmpHeight(const D4D_BMP *pBmp)
Function gets information about bitmap height.
Definition: d4d_bmp.c:481
void D4D_DrawBmpRect(D4D_POINT *ppt, D4D_SIZE *psz, const D4D_BMP *pBmp, D4D_BMP_PROPERTIES bmpProp, D4D_COLOR colorBkgd, D4D_BOOL greyScale)
Function draw the bitmap on the specify coordination into rectangle.
Definition: d4d_bmp.c:240
D4D_EXTIMG_FUNC API structure for eGUI image decoders.
Definition: d4d_bmp.h:107
int D4D_ImgDecExtD4DGetHeader(D4D_CHAR *pFileName, void *pBuff, int max_size)
void(* D4D_ImgDecDraw)(D4D_COOR x, D4D_COOR y, D4D_CHAR *pFileName, D4D_BOOL greyScale, D4D_COOR radius)
Image draw function.
Definition: d4d_bmp.h:109
D4D_EXTIMG_TYPE D4D_GetImgSrcType(D4D_BMP *pBmp)
Function returns the type of image source.
Definition: d4d_bmp.c:143
#define D4D_FileOpen
Macro used as short cut to used File Open function defined by D4D_DECLARE_FILE_FUNCTIONS.
Definition: d4d_extsrc.h:303
const D4D_SIZE d4d_size_zero
Definition: d4d_base.c:74
static const D4D_EXTIMG_FUNC d4d_extImgFunc[D4D_EXTIMG_ITEMS_CNT]
Definition: d4d_bmp.c:55
D4D Driver private header file.
D4D_COOR(* D4D_ImgDecGetWidth)(D4D_CHAR *pFileName)
Get image width function.
Definition: d4d_bmp.h:110
D4D_COOR cx
Size in axis X (width)
Definition: d4d_types.h:232
Byte D4D_COOR
Type definition of eGUI coordination variables.
Definition: d4d_types.h:219
D4D_COOR radius
Screen corner radius.
Definition: d4d_screen.h:177
Just last item where is stored the count of the image decoder. Keep it on last position.
Definition: d4d_bmp.h:96
#define D4D_ALIGN_H_LEFT_MASK
The horizontal left aligment option mask (for texts and also bitmaps).
Definition: d4d_base.h:221
#define D4D_DrawRBmpRect(ppt,psz, pBmp, bmpProp, colorBkgd, greyScale, radius)
Definition: d4d.h:188
const void * pParam
Pointer to pallete to internal memory. In case of external source of image is used as a pointer to fi...
Definition: d4d_bmp.h:103
D4D_EXTIMG_TYPE
D4D_EXTIMG_TYPE eGUI supported image type enumeration.
Definition: d4d_bmp.h:90
D4D_COOR D4D_ImgDecBmpGetHeight(D4D_CHAR *pFileName)
D4D_SIZE(* D4D_ImgDecGetSize)(D4D_CHAR *pFileName)
Get image size function.
Definition: d4d_bmp.h:112
#define D4D_ALIGN_H_MASK
The horizontal aligment option mask (for texts and also bitmaps).
Definition: d4d_base.h:219
#define D4D_EXTSRC_BUFF_SIZE
This macro is used to specify size of buffer that is using when external file support is enabled...
Definition: d4d_base.h:167
D4D_COOR D4D_ImgDecExtD4DGetWidth(D4D_CHAR *pFileName)
#define NULL
Type definition of null pointer.
Definition: d4d_types.h:184
D4D_SIZE D4D_ImgDecIntD4DGetSize(D4D_CHAR *pFileName)
D4D_SIZE D4D_ImgDecBmpGetSize(D4D_CHAR *pFileName)
D4D_COOR(* D4D_ImgDecGetHeight)(D4D_CHAR *pFileName)
Get image height function.
Definition: d4d_bmp.h:111
D4D_COOR y
Coordination in axis Y.
Definition: d4d_types.h:226
D4D_BMP eGUI main image structure.
Definition: d4d_bmp.h:100
void D4D_DrawRBmpXY(D4D_COOR x, D4D_COOR y, const D4D_BMP *pBmp, D4D_BOOL greyScale, D4D_COOR radius)
Function draw the bitmap on the specify coordination.
Definition: d4d_bmp.c:205
Uknown image format - do nothing.
Definition: d4d_bmp.h:92
void D4D_ImgDecExtD4DDraw(D4D_COOR x, D4D_COOR y, D4D_CHAR *pFileName, D4D_BOOL greyScale, D4D_COOR radius)
int D4D_ImgDecBmpGetHeader(D4D_CHAR *pFileName, void *pBuff, int max_size)
#define D4D_IMG_WORK_PATH_DEFAULT
D4D_IMG_WORK_PATH_DEFAULT constant default declaration (&quot;a:\\&quot;)
Definition: d4d_extsrc.h:64
#define D4D_ALIGN_V_BOTTOM_MASK
The vertical bottom aligment option mask (for texts and also bitmaps).
Definition: d4d_base.h:232
int(* D4D_ImgDecGetHeader)(D4D_CHAR *pFileName, void *pBuff, int max_size)
Get image header function.
Definition: d4d_bmp.h:113
int D4D_ImgDecIntD4DGetHeader(D4D_CHAR *pFileName, void *pBuff, int max_size)
D4D_COOR D4D_GetBmpWidth(const D4D_BMP *pBmp)
Function gets information about bitmap width.
Definition: d4d_bmp.c:450
D4D_SIZE D4D_ImgDecExtD4DGetSize(D4D_CHAR *pFileName)
#define D4D_ALIGN_H_CENTER_MASK
The horizontal center aligment option mask (for texts and also bitmaps).
Definition: d4d_base.h:225
D4D_COOR cy
Size in axis Y (height)
Definition: d4d_types.h:233
#define D4D_ALIGN_V_MASK
The vertical aligment option mask (for texts and also bitmaps).
Definition: d4d_base.h:228
D4D_CHAR * D4D_StrCat(register D4D_CHAR *sd, register const D4D_CHAR *ss)
The function concatenate strings (terminated by zero)
Definition: d4d_extsrc.c:211
const void * pData
Pointer to data to internal memory. In case of external source of image this must be NULL...
Definition: d4d_bmp.h:102
LWord D4D_BOOL
Type definition of eGUI boolean.
Definition: d4d_types.h:204
Internal memory eGUI format of image.
Definition: d4d_bmp.h:93
char D4D_CHAR
Type definition of eGUI ASCII character.
Definition: d4d_types.h:280
Type definition of eGUI size structure.
Definition: d4d_types.h:230
void D4D_ToUpper(D4D_CHAR *s)
The function convert all small alpha characters to upper in string(terminated by zero) ...
Definition: d4d_extsrc.c:318
void D4D_FillRRect(D4D_POINT *ppt, D4D_SIZE *psz, D4D_COLOR color, D4D_COOR radius)
Function draw filled rectangle on the screen with round corners.
D4D_SIZE D4D_GetBmpSize(const D4D_BMP *pBmp)
Function gets information about bitmap size.
Definition: d4d_bmp.c:418
int D4D_CompareStrings(const D4D_CHAR *s1, const D4D_CHAR *s2)
The function copare two strings (terminated by zero)
Definition: d4d_extsrc.c:257
#define D4D_BMP_EXTSRC_SUPPORT_D4D_EXT
D4D_BMP_EXTSRC_SUPPORT_D4D_EXT constant default declaration.
Definition: d4d_bmp.h:68
External memory MicroSoft BMP format of image.
Definition: d4d_bmp.h:95
#define D4D_ALIGN_V_TOP_MASK
The vertical top aligment option mask (for texts and also bitmaps).
Definition: d4d_base.h:230
Byte d4d_extsrcBuffer[D4D_EXTSRC_BUFF_SIZE]
D4D driver - resistive touch screen driver function header file.
LWord D4D_COLOR
Type definition of eGUI color variables.
Definition: d4d_types.h:262
D4D_BOOL D4D_FileIsAbsolutePath(D4D_CHAR *pFileName)
void * D4D_FILEPTR
Type definition of eGUI file pointer.
Definition: d4d_types.h:298
D4D_COOR x
Coordination in axis X.
Definition: d4d_types.h:225
int D4D_StrLen(register const D4D_CHAR *s)
The function returns length of string terminated by zero.
Definition: d4d_extsrc.c:128