34 #define min(a, b) (((a) < (b)) ? (a) : (b))
38 #define max(a, b) (((a) < (b)) ? (b) : (a))
91 int16_t lX0, int16_t lCount, int16_t lBPP,
92 const uint8_t *pucData,
93 const uint32_t *pucPalette);
211 #define ClrAliceBlue GRAPHICS_COLOR_ALICE_BLUE
212 #define ClrAntiqueWhite GRAPHICS_COLOR_ANTIQUE_WHITE
213 #define ClrAqua GRAPHICS_COLOR_AQUA
214 #define ClrAquamarine GRAPHICS_COLOR_AQUAMARINE
215 #define ClrAzure GRAPHICS_COLOR_AZURE
216 #define ClrBeige GRAPHICS_COLOR_BEIGE
217 #define ClrBisque GRAPHICS_COLOR_BISQUE
218 #define ClrBlack GRAPHICS_COLOR_BLACK
219 #define ClrBlanchedAlmond GRAPHICS_COLOR_BLANCHED_ALMOND
220 #define ClrBlue GRAPHICS_COLOR_BLUE
221 #define ClrBlueViolet GRAPHICS_COLOR_BLUE_VIOLET
222 #define ClrBrown GRAPHICS_COLOR_BROWN
223 #define ClrBurlyWood GRAPHICS_COLOR_BURLY_WOOD
224 #define ClrCadetBlue GRAPHICS_COLOR_CADET_BLUE
225 #define ClrChartreuse GRAPHICS_COLOR_CHARTREUSE
226 #define ClrChocolate GRAPHICS_COLOR_CHOCOLATE
227 #define ClrCoral GRAPHICS_COLOR_CORAL
228 #define ClrCornflowerBlue GRAPHICS_COLOR_CORNFLOWER_BLUE
229 #define ClrCornsilk GRAPHICS_COLOR_CORNSILK
230 #define ClrCrimson GRAPHICS_COLOR_CRIMSON
231 #define ClrCyan GRAPHICS_COLOR_CYAN
232 #define ClrDarkBlue GRAPHICS_COLOR_DARK_BLUE
233 #define ClrDarkCyan GRAPHICS_COLOR_DARK_CYAN
234 #define ClrDarkGoldenrod GRAPHICS_COLOR_DARK_GOLDENROD
235 #define ClrDarkGray GRAPHICS_COLOR_DARK_GRAY
236 #define ClrDarkGreen GRAPHICS_COLOR_DARK_GREEN
237 #define ClrDarkKhaki GRAPHICS_COLOR_DARK_KHAKI
238 #define ClrDarkMagenta GRAPHICS_COLOR_DARK_MAGENTA
239 #define ClrDarkOliveGreen GRAPHICS_COLOR_DARK_OLIVE_GREEN
240 #define ClrDarkOrange GRAPHICS_COLOR_DARK_ORANGE
241 #define ClrDarkOrchid GRAPHICS_COLOR_DARK_ORCHID
242 #define ClrDarkRed GRAPHICS_COLOR_DARK_RED
243 #define ClrDarkSalmon GRAPHICS_COLOR_DARK_SALMON
244 #define ClrDarkSeaGreen GRAPHICS_COLOR_DARK_SEA_GREEN
245 #define ClrDarkSlateBlue GRAPHICS_COLOR_DARK_SLATE_BLUE
246 #define ClrDarkSlateGray GRAPHICS_COLOR_DARK_SLATE_GRAY
247 #define ClrDarkTurquoise GRAPHICS_COLOR_DARK_TURQUOISE
248 #define ClrDarkViolet GRAPHICS_COLOR_DARK_VIOLET
249 #define ClrDeepPink GRAPHICS_COLOR_DEEP_PINK
250 #define ClrDeepSkyBlue GRAPHICS_COLOR_DEEP_SKY_BLUE
251 #define ClrDimGray GRAPHICS_COLOR_DIM_GRAY
252 #define ClrDodgerBlue GRAPHICS_COLOR_DODGER_BLUE
253 #define ClrFireBrick GRAPHICS_COLOR_FIRE_BRICK
254 #define ClrFloralWhite GRAPHICS_COLOR_FLORAL_WHITE
255 #define ClrForestGreen GRAPHICS_COLOR_FOREST_GREEN
256 #define ClrFuchsia GRAPHICS_COLOR_FUCHSIA
257 #define ClrGainsboro GRAPHICS_COLOR_GAINSBORO
258 #define ClrGhostWhite GRAPHICS_COLOR_GHOST_WHITE
259 #define ClrGold GRAPHICS_COLOR_GOLD
260 #define ClrGoldenrod GRAPHICS_COLOR_GOLDENRON
261 #define ClrGray GRAPHICS_COLOR_GRAY
262 #define ClrGreen GRAPHICS_COLOR_GREEN
263 #define ClrGreenYellow GRAPHICS_COLOR_GREEN_YELLOW
264 #define ClrHoneydew GRAPHICS_COLOR_HONEYDEW
265 #define ClrHotPink GRAPHICS_COLOR_HOT_PINK
266 #define ClrIndianRed GRAPHICS_COLOR_INDIAN_RED
267 #define ClrIndigo GRAPHICS_COLOR_INDIGO
268 #define ClrIvory GRAPHICS_COLOR_IVORY
269 #define ClrKhaki GRAPHICS_COLOR_KHAKI
270 #define ClrLavender GRAPHICS_COLOR_LAVENDER
271 #define ClrLavenderBlush GRAPHICS_COLOR_LAVENDER_BLUSH
272 #define ClrLawnGreen GRAPHICS_COLOR_LAWN_GREEN
273 #define ClrLemonChiffon GRAPHICS_COLOR_LEMON_CHIFFON
274 #define ClrLightBlue GRAPHICS_COLOR_LIGHT_BLUE
275 #define ClrLightCoral GRAPHICS_COLOR_LIGHT_CORAL
276 #define ClrLightCyan GRAPHICS_COLOR_LIGHT_CYAN
277 #define ClrLightGoldenrodYellow GRAPHICS_COLOR_LIGHT_GOLDENRON_YELLOW
278 #define ClrLightGreen GRAPHICS_COLOR_LIGHT_GREEN
279 #define ClrLightGrey GRAPHICS_COLOR_LIGHT_GRAY
280 #define ClrLightPink GRAPHICS_COLOR_LIGHT_PINK
281 #define ClrLightSalmon GRAPHICS_COLOR_LIGHT_SALMON
282 #define ClrLightSeaGreen GRAPHICS_COLOR_LIGHT_SEA_GREEN
283 #define ClrLightSkyBlue GRAPHICS_COLOR_LIGHT_SKY_BLUE
284 #define ClrLightSlateGray GRAPHICS_COLOR_LIGHT_SLATE_GRAY
285 #define ClrLightSteelBlue GRAPHICS_COLOR_LIGHT_STEEL_BLUE
286 #define ClrLightYellow GRAPHICS_COLOR_LIGHT_YELLOW
287 #define ClrLime GRAPHICS_COLOR_LIME
288 #define ClrLimeGreen GRAPHICS_COLOR_LIME_GREEN
289 #define ClrLinen GRAPHICS_COLOR_LINEN
290 #define ClrMagenta GRAPHICS_COLOR_MAGENTA
291 #define ClrMaroon GRAPHICS_COLOR_MAROON
292 #define ClrMediumAquamarine GRAPHICS_COLOR_MEDIUM_AQUAMARINE
293 #define ClrMediumBlue GRAPHICS_COLOR_MEDIUM_BLUE
294 #define ClrMediumOrchid GRAPHICS_COLOR_MEDIUM_ORCHID
295 #define ClrMediumPurple GRAPHICS_COLOR_MEDIUM_PURPLE
296 #define ClrMediumSeaGreen GRAPHICS_COLOR_MEDIUM_SEA_GREEN
297 #define ClrMediumSlateBlue GRAPHICS_COLOR_MEDIUM_SLATE_BLUE
298 #define ClrMediumSpringGreen GRAPHICS_COLOR_MEDIUM_SPRING_GREEN
299 #define ClrMediumTurquoise GRAPHICS_COLOR_MEDIUM_TURQUOISE
300 #define ClrMediumVioletRed GRAPHICS_COLOR_MEDIUM_VIOLET_RED
301 #define ClrMidnightBlue GRAPHICS_COLOR_MIGNIGHT_BLUE
302 #define ClrMintCream GRAPHICS_COLOR_MINT_CREAM
303 #define ClrMistyRose GRAPHICS_COLOR_MISTY_ROSE
304 #define ClrMoccasin GRAPHICS_COLOR_MOCCASIN
305 #define ClrNavajoWhite GRAPHICS_COLOR_NAVAJO_WHITE
306 #define ClrNavy GRAPHICS_COLOR_NAVY
307 #define ClrOldLace GRAPHICS_COLOR_OLD_LACE
308 #define ClrOlive GRAPHICS_COLOR_OLIVE
309 #define ClrOliveDrab GRAPHICS_COLOR_OLIVE_DRAB
310 #define ClrOrange GRAPHICS_COLOR_ORANGE
311 #define ClrOrangeRed GRAPHICS_COLOR_ORANGE_RED
312 #define ClrOrchid GRAPHICS_COLOR_ORCHID
313 #define ClrPaleGoldenrod GRAPHICS_COLOR_PALE_GOLDENRON
314 #define ClrPaleGreen GRAPHICS_COLOR_PALE_GREEN
315 #define ClrPaleTurquoise GRAPHICS_COLOR_PALE_TURQUOISE
316 #define ClrPaleVioletRed GRAPHICS_COLOR_PALE_VIOLET_RED
317 #define ClrPapayaWhip GRAPHICS_COLOR_PAPAYA_WHIP
318 #define ClrPeachPuff GRAPHICS_COLOR_PEACH_PUFF
319 #define ClrPeru GRAPHICS_COLOR_PERU
320 #define ClrPink GRAPHICS_COLOR_PINK
321 #define ClrPlum GRAPHICS_COLOR_PLUM
322 #define ClrPowderBlue GRAPHICS_COLOR_POWDER_BLUE
323 #define ClrPurple GRAPHICS_COLOR_PURPLE
324 #define ClrRed GRAPHICS_COLOR_RED
325 #define ClrRosyBrown GRAPHICS_COLOR_ROSY_BROWN
326 #define ClrRoyalBlue GRAPHICS_COLOR_ROYAL_BLUE
327 #define ClrSaddleBrown GRAPHICS_COLOR_SADDLE_BROWN
328 #define ClrSalmon GRAPHICS_COLOR_SALMON
329 #define ClrSandyBrown GRAPHICS_COLOR_SANDY_BROWN
330 #define ClrSeaGreen GRAPHICS_COLOR_SEA_GREEN
331 #define ClrSeashell GRAPHICS_COLOR_SEASHELL
332 #define ClrSienna GRAPHICS_COLOR_SIENNA
333 #define ClrSilver GRAPHICS_COLOR_SILVER
334 #define ClrSkyBlue GRAPHICS_COLOR_SKY_BLUE
335 #define ClrSlateBlue GRAPHICS_COLOR_SLATE_BLUE
336 #define ClrSlateGray GRAPHICS_COLOR_SLATE_GRAY
337 #define ClrSnow GRAPHICS_COLOR_SNOW
338 #define ClrSpringGreen GRAPHICS_COLOR_SPRING_GREEN
339 #define ClrSteelBlue GRAPHICS_COLOR_STEEL_BLUE
340 #define ClrTan GRAPHICS_COLOR_TAN
341 #define ClrTeal GRAPHICS_COLOR_TEAL
342 #define ClrThistle GRAPHICS_COLOR_THISTLE
343 #define ClrTomato GRAPHICS_COLOR_TOMATO
344 #define ClrTurquoise GRAPHICS_COLOR_TURQUOISE
345 #define ClrViolet GRAPHICS_COLOR_VIOLET
346 #define ClrWheat GRAPHICS_COLOR_WHEAT
347 #define ClrWhite GRAPHICS_COLOR_WHITE
348 #define ClrWhiteSmoke GRAPHICS_COLOR_WHITE_SMOKE
349 #define ClrYellow GRAPHICS_COLOR_YELLOW
350 #define ClrYellowGreen GRAPHICS_COLOR_YELLOW_GREEN
351 #define ClrBlack GRAPHICS_COLOR_BLACK
352 #define FONT_FMT_UNCOMPRESSED GRAPHICS_FONT_FMT_UNCOMPRESSED
353 #define FONT_FMT_PIXEL_RLE GRAPHICS_FONT_FMT_PIXEL_RLE
354 #define FONT_EX_MARKER GRAPHICS_FONT_EX_MARKER
355 #define FONT_FMT_EX_UNCOMPRESSED GRAPHICS_FONT_FMT_EX_UNCOMPRESSED
356 #define FONT_FMT_EX_PIXEL_RLE GRAPHICS_FONT_FMT_EX_PIXEL_RLE
357 #define AUTO_STRING_LENGTH GRAPHICS_AUTO_STRING_LENGTH
358 #define OPAQUE_TEXT GRAPHICS_OPAQUE_TEXT
359 #define TRANSPARENT_TEXT GRAPHICS_TRANSPARENT_TEXT
360 #define IMAGE_FMT_1BPP_UNCOMP GRAPHICS_IMAGE_FMT_1BPP_UNCOMP
361 #define IMAGE_FMT_2BPP_UNCOMP GRAPHICS_IMAGE_FMT_2BPP_UNCOMP
362 #define IMAGE_FMT_4BPP_UNCOMP GRAPHICS_IMAGE_FMT_4BPP_UNCOMP
363 #define IMAGE_FMT_8BPP_UNCOMP GRAPHICS_IMAGE_FMT_8BPP_UNCOMP
364 #define IMAGE_FMT_1BPP_COMP_RLE4 GRAPHICS_IMAGE_FMT_1BPP_COMP_RLE4
365 #define IMAGE_FMT_2BPP_UNCOMP GRAPHICS_IMAGE_FMT_2BPP_UNCOMP
366 #define IMAGE_FMT_4BPP_COMP_RLE4 GRAPHICS_IMAGE_FMT_4BPP_COMP_RLE4
367 #define IMAGE_FMT_1BPP_COMP_RLE7 GRAPHICS_IMAGE_FMT_1BPP_COMP_RLE7
368 #define IMAGE_FMT_1BPP_COMP_RLE8 GRAPHICS_IMAGE_FMT_1BPP_COMP_RLE8
369 #define IMAGE_FMT_2BPP_COMP_RLE8 GRAPHICS_IMAGE_FMT_2BPP_COMP_RLE8
370 #define IMAGE_FMT_4BPP_COMP_RLE8 GRAPHICS_IMAGE_FMT_4BPP_COMP_RLE8
371 #define IMAGE_FMT_8BPP_COMP_RLE8 GRAPHICS_IMAGE_FMT_8BPP_COMP_RLE8
372 #define IMAGE_FMT_8BPP_COMP_RLEBLEND GRAPHICS_IMAGE_FMT_8BPP_COMP_RLEBLEND
373 #define tFontEx Graphics_FontEx
374 #define tFont Graphics_Font
375 #define tDisplay Graphics_Display
376 #define tRectangle Graphics_Rectangle
377 #define tImage Graphics_Image
378 #define tContext Graphics_Context
391 #define GrCircleDraw Graphics_drawCircle
392 #define GrCircleFill Graphics_fillCircle
393 #define GrContextClipRegionSet Graphics_setClipRegion
394 #define GrContextInit Graphics_initContext
395 #define GrImageDraw Graphics_drawImage
396 #define GrLineDraw Graphics_drawLine
397 #define GrLineDrawH Graphics_drawLineH
398 #define GrLineDrawV Graphics_drawLineV
399 #define GrRectDraw Graphics_drawRectangle
400 #define GrRectFill Graphics_fillRectangle
401 #define GrStringDraw Graphics_drawString
402 #define GrStringWidthGet Graphics_getStringWidth
403 #define GrRectOverlapCheck Graphics_isOverlappingRectangle
404 #define GrRectIntersectGet Graphics_getRectangleIntersection
405 #define GrContextBackgroundSet Graphics_setBackgroundColor
406 #define GrContextBackgroundSetTranslated \
407 Graphics_setBackgroundColorTranslated
408 #define GrContextDpyWidthGet Graphics_getDisplayWidth
409 #define GrContextDpyHeightGet Graphics_getDisplayHeight
410 #define GrContextFontSet Graphics_setFont
411 #define GrContextForegroundSet Graphics_setForegroundColor
412 #define GrContextForegroundSetTranslated \
413 Graphics_setForegroundColorTranslated
414 #define GrFlush Graphics_flushBuffer
415 #define GrClearDisplay Graphics_clearDisplay
416 #define GrFontBaselineGet Graphics_getFontBaseline
417 #define GrFontHeightGet Graphics_getFontHeight
418 #define GrFontMaxWidthGet Graphics_getFontMaxWidth
419 #define GrImageColorsGet Graphics_getImageColors
420 #define GrImageHeightGet Graphics_getImageHeight
421 #define GrImageWidthGet Graphics_getImageWidth
422 #define GrOffScreen1BPPSize \
423 Graphics_getOffscreen1BppImageSize
424 #define GrOffScreen4BPPSize \
425 Graphics_getOffscreen4BppImageSize
426 #define GrOffScreen8BPPSize \
427 Graphics_getOffscreen8BppImageSize
428 #define GrPixelDraw Graphics_drawPixel
429 #define GrStringBaselineGet Graphics_getStringBaseline
430 #define GrStringDrawCentered Graphics_drawStringCentered
431 #define GrStringHeightGet Graphics_getStringHeight
432 #define GrStringMaxWidthGet Graphics_getStringMaxWidth
433 #define DpyColorTranslate Graphics_translateColorOnDisplay
434 #define DpyFlush Graphics_flushOnDisplay
435 #define DpyClearDisplay Graphics_clearDisplayOnDisplay
436 #define DpyHeightGet Graphics_getHeightOfDisplay
437 #define DpyLineDrawH \
438 Graphics_drawHorizontalLineOnDisplay
439 #define DpyLineDrawV Graphics_drawVerticalLineOnDisplay
440 #define DpyPixelDraw Graphics_drawPixelOnDisplay
441 #define DpyPixelDrawMultiple \
442 Graphics_drawMultiplePixelsOnDisplay
443 #define DpyRectFill Graphics_fillRectangleOnDisplay
444 #define DpyWidthGet Graphics_getWidthOfDisplay
445 #define GrRectContainsPoint Graphics_isPointWithinRectangle
452 #define GRAPHICS_FONT_FMT_UNCOMPRESSED 0x00
459 #define GRAPHICS_FONT_FMT_PIXEL_RLE 0x01
467 #define GRAPHICS_FONT_EX_MARKER 0x80
475 #define GRAPHICS_FONT_FMT_EX_UNCOMPRESSED (FONT_FMT_UNCOMPRESSED | \
484 #define GRAPHICS_FONT_FMT_EX_PIXEL_RLE (FONT_FMT_PIXEL_RLE | \
493 #define GRAPHICS_AUTO_STRING_LENGTH -1
501 #define GRAPHICS_OPAQUE_TEXT 1
509 #define GRAPHICS_TRANSPARENT_TEXT 0
517 #define GRAPHICS_IMAGE_FMT_1BPP_UNCOMP 0x01
525 #define GRAPHICS_IMAGE_FMT_2BPP_UNCOMP 0x02
533 #define GRAPHICS_IMAGE_FMT_4BPP_UNCOMP 0x04
541 #define GRAPHICS_IMAGE_FMT_8BPP_UNCOMP 0x08
549 #define GRAPHICS_IMAGE_FMT_1BPP_COMP_RLE4 0x41
557 #define GRAPHICS_IMAGE_FMT_2BPP_COMP_RLE4 0x42
565 #define GRAPHICS_IMAGE_FMT_4BPP_COMP_RLE4 0x44
573 #define GRAPHICS_IMAGE_FMT_1BPP_COMP_RLE7 0x71
581 #define GRAPHICS_IMAGE_FMT_1BPP_COMP_RLE8 0x81
589 #define GRAPHICS_IMAGE_FMT_2BPP_COMP_RLE8 0x82
597 #define GRAPHICS_IMAGE_FMT_4BPP_COMP_RLE8 0x84
605 #define GRAPHICS_IMAGE_FMT_8BPP_COMP_RLE8 0x88
613 #define GRAPHICS_IMAGE_FMT_8BPP_COMP_RLEBLEND 0x28
621 #define GRAPHICS_COLOR_ALICE_BLUE 0x00F0F8FF
622 #define GRAPHICS_COLOR_ANTIQUE_WHITE 0x00FAEBD7
623 #define GRAPHICS_COLOR_AQUA 0x0000FFFF
624 #define GRAPHICS_COLOR_AQUAMARINE 0x007FFFD4
625 #define GRAPHICS_COLOR_AZURE 0x00F0FFFF
626 #define GRAPHICS_COLOR_BEIGE 0x00F5F5DC
627 #define GRAPHICS_COLOR_BISQUE 0x00FFE4C4
628 #define GRAPHICS_COLOR_BLACK 0x00000000
629 #define GRAPHICS_COLOR_BLANCHED_ALMOND 0x00FFEBCD
630 #define GRAPHICS_COLOR_BLUE 0x000000FF
631 #define GRAPHICS_COLOR_BLUE_VIOLET 0x008A2BE2
632 #define GRAPHICS_COLOR_BROWN 0x00A52A2A
633 #define GRAPHICS_COLOR_BURLY_WOOD 0x00DEB887
634 #define GRAPHICS_COLOR_CADET_BLUE 0x005F9EA0
635 #define GRAPHICS_COLOR_CHARTREUSE 0x007FFF00
636 #define GRAPHICS_COLOR_CHOCOLATE 0x00D2691E
637 #define GRAPHICS_COLOR_CORAL 0x00FF7F50
638 #define GRAPHICS_COLOR_CORNFLOWER_BLUE 0x006495ED
639 #define GRAPHICS_COLOR_CORNSILK 0x00FFF8DC
640 #define GRAPHICS_COLOR_CRIMSON 0x00DC143C
641 #define GRAPHICS_COLOR_CYAN 0x0000FFFF
642 #define GRAPHICS_COLOR_DARK_BLUE 0x0000008B
643 #define GRAPHICS_COLOR_DARK_CYAN 0x00008B8B
644 #define GRAPHICS_COLOR_DARK_GOLDENROD 0x00B8860B
645 #define GRAPHICS_COLOR_DARK_GRAY 0x00A9A9A9
646 #define GRAPHICS_COLOR_DARK_GREEN 0x00006400
647 #define GRAPHICS_COLOR_DARK_KHAKI 0x00BDB76B
648 #define GRAPHICS_COLOR_DARK_MAGENTA 0x008B008B
649 #define GRAPHICS_COLOR_DARK_OLIVE_GREEN 0x00556B2F
650 #define GRAPHICS_COLOR_DARK_ORANGE 0x00FF8C00
651 #define GRAPHICS_COLOR_DARK_ORCHID 0x009932CC
652 #define GRAPHICS_COLOR_DARK_RED 0x008B0000
653 #define GRAPHICS_COLOR_DARK_SALMON 0x00E9967A
654 #define GRAPHICS_COLOR_DARK_SEA_GREEN 0x008FBC8F
655 #define GRAPHICS_COLOR_DARK_SLATE_BLUE 0x00483D8B
656 #define GRAPHICS_COLOR_DARK_SLATE_GRAY 0x002F4F4F
657 #define GRAPHICS_COLOR_DARK_TURQUOISE 0x0000CED1
658 #define GRAPHICS_COLOR_DARK_VIOLET 0x009400D3
659 #define GRAPHICS_COLOR_DEEP_PINK 0x00FF1493
660 #define GRAPHICS_COLOR_DEEP_SKY_BLUE 0x0000BFFF
661 #define GRAPHICS_COLOR_DIM_GRAY 0x00696969
662 #define GRAPHICS_COLOR_DODGER_BLUE 0x001E90FF
663 #define GRAPHICS_COLOR_FIRE_BRICK 0x00B22222
664 #define GRAPHICS_COLOR_FLORAL_WHITE 0x00FFFAF0
665 #define GRAPHICS_COLOR_FOREST_GREEN 0x00228B22
666 #define GRAPHICS_COLOR_FUCHSIA 0x00FF00FF
667 #define GRAPHICS_COLOR_GAINSBORO 0x00DCDCDC
668 #define GRAPHICS_COLOR_GHOST_WHITE 0x00F8F8FF
669 #define GRAPHICS_COLOR_GOLD 0x00FFD700
670 #define GRAPHICS_COLOR_GOLDENRON 0x00DAA520
671 #define GRAPHICS_COLOR_GRAY 0x00808080
672 #define GRAPHICS_COLOR_GREEN 0x00008000
673 #define GRAPHICS_COLOR_GREEN_YELLOW 0x00ADFF2F
674 #define GRAPHICS_COLOR_HONEYDEW 0x00F0FFF0
675 #define GRAPHICS_COLOR_HOT_PINK 0x00FF69B4
676 #define GRAPHICS_COLOR_INDIAN_RED 0x00CD5C5C
677 #define GRAPHICS_COLOR_INDIGO 0x004B0082
678 #define GRAPHICS_COLOR_IVORY 0x00FFFFF0
679 #define GRAPHICS_COLOR_KHAKI 0x00F0E68C
680 #define GRAPHICS_COLOR_LAVENDER 0x00E6E6FA
681 #define GRAPHICS_COLOR_LAVENDER_BLUSH 0x00FFF0F5
682 #define GRAPHICS_COLOR_LAWN_GREEN 0x007CFC00
683 #define GRAPHICS_COLOR_LEMON_CHIFFON 0x00FFFACD
684 #define GRAPHICS_COLOR_LIGHT_BLUE 0x00ADD8E6
685 #define GRAPHICS_COLOR_LIGHT_CORAL 0x00F08080
686 #define GRAPHICS_COLOR_LIGHT_CYAN 0x00E0FFFF
687 #define GRAPHICS_COLOR_LIGHT_GOLDENRON_YELLOW 0x00FAFAD2
688 #define GRAPHICS_COLOR_LIGHT_GREEN 0x0090EE90
689 #define GRAPHICS_COLOR_LIGHT_GRAY 0x00D3D3D3
690 #define GRAPHICS_COLOR_LIGHT_PINK 0x00FFB6C1
691 #define GRAPHICS_COLOR_LIGHT_SALMON 0x00FFA07A
692 #define GRAPHICS_COLOR_LIGHT_SEA_GREEN 0x0020B2AA
693 #define GRAPHICS_COLOR_LIGHT_SKY_BLUE 0x0087CEFA
694 #define GRAPHICS_COLOR_LIGHT_SLATE_GRAY 0x00778899
695 #define GRAPHICS_COLOR_LIGHT_STEEL_BLUE 0x00B0C4DE
696 #define GRAPHICS_COLOR_LIGHT_YELLOW 0x00FFFFE0
697 #define GRAPHICS_COLOR_LIME 0x0000FF00
698 #define GRAPHICS_COLOR_LIME_GREEN 0x0032CD32
699 #define GRAPHICS_COLOR_LINEN 0x00FAF0E6
700 #define GRAPHICS_COLOR_MAGENTA 0x00FF00FF
701 #define GRAPHICS_COLOR_MAROON 0x00800000
702 #define GRAPHICS_COLOR_MEDIUM_AQUAMARINE 0x0066CDAA
703 #define GRAPHICS_COLOR_MEDIUM_BLUE 0x000000CD
704 #define GRAPHICS_COLOR_MEDIUM_ORCHID 0x00BA55D3
705 #define GRAPHICS_COLOR_MEDIUM_PURPLE 0x009370DB
706 #define GRAPHICS_COLOR_MEDIUM_SEA_GREEN 0x003CB371
707 #define GRAPHICS_COLOR_MEDIUM_SLATE_BLUE 0x007B68EE
708 #define GRAPHICS_COLOR_MEDIUM_SPRING_GREEN 0x0000FA9A
709 #define GRAPHICS_COLOR_MEDIUM_TURQUOISE 0x0048D1CC
710 #define GRAPHICS_COLOR_MEDIUM_VIOLET_RED 0x00C71585
711 #define GRAPHICS_COLOR_MIGNIGHT_BLUE 0x00191970
712 #define GRAPHICS_COLOR_MINT_CREAM 0x00F5FFFA
713 #define GRAPHICS_COLOR_MISTY_ROSE 0x00FFE4E1
714 #define GRAPHICS_COLOR_MOCCASIN 0x00FFE4B5
715 #define GRAPHICS_COLOR_NAVAJO_WHITE 0x00FFDEAD
716 #define GRAPHICS_COLOR_NAVY 0x00000080
717 #define GRAPHICS_COLOR_OLD_LACE 0x00FDF5E6
718 #define GRAPHICS_COLOR_OLIVE 0x00808000
719 #define GRAPHICS_COLOR_OLIVE_DRAB 0x006B8E23
720 #define GRAPHICS_COLOR_ORANGE 0x00FFA500
721 #define GRAPHICS_COLOR_ORANGE_RED 0x00FF4500
722 #define GRAPHICS_COLOR_ORCHID 0x00DA70D6
723 #define GRAPHICS_COLOR_PALE_GOLDENRON 0x00EEE8AA
724 #define GRAPHICS_COLOR_PALE_GREEN 0x0098FB98
725 #define GRAPHICS_COLOR_PALE_TURQUOISE 0x00AFEEEE
726 #define GRAPHICS_COLOR_PALE_VIOLET_RED 0x00DB7093
727 #define GRAPHICS_COLOR_PAPAYA_WHIP 0x00FFEFD5
728 #define GRAPHICS_COLOR_PEACH_PUFF 0x00FFDAB9
729 #define GRAPHICS_COLOR_PERU 0x00CD853F
730 #define GRAPHICS_COLOR_PINK 0x00FFC0CB
731 #define GRAPHICS_COLOR_PLUM 0x00DDA0DD
732 #define GRAPHICS_COLOR_POWDER_BLUE 0x00B0E0E6
733 #define GRAPHICS_COLOR_PURPLE 0x00800080
734 #define GRAPHICS_COLOR_RED 0x00FF0000
735 #define GRAPHICS_COLOR_ROSY_BROWN 0x00BC8F8F
736 #define GRAPHICS_COLOR_ROYAL_BLUE 0x004169E1
737 #define GRAPHICS_COLOR_SADDLE_BROWN 0x008B4513
738 #define GRAPHICS_COLOR_SALMON 0x00FA8072
739 #define GRAPHICS_COLOR_SANDY_BROWN 0x00F4A460
740 #define GRAPHICS_COLOR_SEA_GREEN 0x002E8B57
741 #define GRAPHICS_COLOR_SEASHELL 0x00FFF5EE
742 #define GRAPHICS_COLOR_SIENNA 0x00A0522D
743 #define GRAPHICS_COLOR_SILVER 0x00C0C0C0
744 #define GRAPHICS_COLOR_SKY_BLUE 0x0087CEEB
745 #define GRAPHICS_COLOR_SLATE_BLUE 0x006A5ACD
746 #define GRAPHICS_COLOR_SLATE_GRAY 0x00708090
747 #define GRAPHICS_COLOR_SNOW 0x00FFFAFA
748 #define GRAPHICS_COLOR_SPRING_GREEN 0x0000FF7F
749 #define GRAPHICS_COLOR_STEEL_BLUE 0x004682B4
750 #define GRAPHICS_COLOR_TAN 0x00D2B48C
751 #define GRAPHICS_COLOR_TEAL 0x00008080
752 #define GRAPHICS_COLOR_THISTLE 0x00D8BFD8
753 #define GRAPHICS_COLOR_TOMATO 0x00FF6347
754 #define GRAPHICS_COLOR_TURQUOISE 0x0040E0D0
755 #define GRAPHICS_COLOR_VIOLET 0x00EE82EE
756 #define GRAPHICS_COLOR_WHEAT 0x00F5DEB3
757 #define GRAPHICS_COLOR_WHITE 0x00FFFFFF
758 #define GRAPHICS_COLOR_WHITE_SMOKE 0x00F5F5F5
759 #define GRAPHICS_COLOR_YELLOW 0x00FFFF00
760 #define GRAPHICS_COLOR_YELLOW_GREEN 0x009ACD32
761 #define GRAPHICS_COLOR_BLACK 0x00000000
768 #define ClrRedMask 0x00FF0000
769 #define ClrRedShift 16
770 #define ClrGreenMask 0x0000FF00
771 #define ClrGreenShift 8
772 #define ClrBlueMask 0x000000FF
773 #define ClrBlueShift 0
942 #define GrLangZhPRC 0x0804 // Chinese (PRC)
943 #define GrLangZhTW 0x0404 // Chinese (Taiwan)
944 #define GrLangEnUS 0x0409 // English (United States)
945 #define GrLangEnUK 0x0809 // English (United Kingdom)
946 #define GrLangEnAUS 0x0C09 // English (Australia)
947 #define GrLangEnCA 0x1009 // English (Canada)
948 #define GrLangEnNZ 0x1409 // English (New Zealand)
949 #define GrLangFr 0x040C // French (Standard)
950 #define GrLangDe 0x0407 // German (Standard)
951 #define GrLangHi 0x0439 // Hindi
952 #define GrLangIt 0x0410 // Italian (Standard)
953 #define GrLangJp 0x0411 // Japanese
954 #define GrLangKo 0x0412 // Korean
955 #define GrLangEsMX 0x080A // Spanish (Mexico)
956 #define GrLangEsSP 0x0C0A // Spanish (Spain)
957 #define GrLangSwKE 0x0441 // Swahili (Kenya)
958 #define GrLangUrIN 0x0820 // Urdu (India)
959 #define GrLangUrPK 0x0420 // Urdu (Pakistan)
1024 const int8_t *
string,
1105 const uint8_t *data,
1106 const uint32_t *pucPalette);
1144 #endif // __GRLIB_H__
const uint8_t * data
A pointer to the data for the font.
Definition: grlib.h:185
const uint32_t * pPalette
Pointer to Palette.
Definition: grlib.h:52
uint8_t Graphics_getStringMaxWidth(const Graphics_Context *context)
Definition: string.c:801
void Graphics_drawLine(const Graphics_Context *context, int32_t x1, int32_t y1, int32_t x2, int32_t y2)
Definition: line.c:442
uint16_t width
The width of this display.
Definition: grlib.h:144
uint16_t offset[96]
The offset within data to the data for each character in the font.
Definition: grlib.h:160
void Graphics_setBackgroundColor(Graphics_Context *context, int32_t value)
Definition: context.c:138
uint8_t last
The codepoint number representing the last character encoded in the font.
Definition: grlib.h:183
void(*const pfnFlush)(const Graphics_Display *pDisplay)
Definition: grlib.h:124
void Graphics_drawStringCentered(const Graphics_Context *context, int8_t *string, int32_t length, int32_t x, int32_t y, bool opaque)
Definition: string.c:753
void Graphics_drawString(const Graphics_Context *context, int8_t *string, int32_t lLength, int32_t x, int32_t y, bool opaque)
Definition: string.c:179
This structure defines the characteristics of a display driver.
Definition: grlib.h:140
uint32_t Graphics_getOffScreen8BPPSize(uint16_t width, uint16_t height)
Definition: image.c:408
uint32_t Graphics_getOffscreen1BppImageSize(uint16_t width, uint16_t height)
Definition: image.c:370
void Graphics_drawHorizontalLineOnDisplay(const Graphics_Display *display, uint16_t x1, uint16_t x2, uint16_t y, uint32_t value)
Definition: display.c:91
uint8_t baseline
The offset between the top of the character cell and the baseline of the glyph. The baseline is the b...
Definition: grlib.h:181
void Graphics_setForegroundColorTranslated(Graphics_Context *context, int32_t value)
Definition: context.c:243
int32_t Graphics_getRectangleIntersection(Graphics_Rectangle *psRect1, Graphics_Rectangle *psRect2, Graphics_Rectangle *psIntersect)
Definition: rectangle.c:224
uint16_t Graphics_getWidthOfDisplay(const Graphics_Display *display)
Definition: context.c:409
uint32_t foreground
The color used to draw primitives onto the screen.
Definition: grlib.h:199
uint16_t numColors
Number of Colors in Palette.
Definition: grlib.h:51
int16_t yMin
The minimum Y coordinate of the rectangle.
Definition: grlib.h:66
uint16_t heigth
The height of this display.
Definition: grlib.h:145
int32_t size
The size of this structure.
Definition: grlib.h:196
void Graphics_drawLineV(const Graphics_Context *context, int32_t x, int32_t y1, int32_t y2)
Definition: line.c:114
void(*const pfnLineDrawV)(const Graphics_Display *pDisplay, int16_t lX, int16_t lY1, int16_t lY2, uint16_t ulValue)
A pointer to the function to draw a vertical line on this display.
Definition: grlib.h:104
uint8_t height
The height of the character cell; this may be taller than the font data for the characters (to provid...
Definition: grlib.h:180
bool Graphics_isPointWithinRectangle(const Graphics_Rectangle *rect, uint16_t x, uint16_t y)
Definition: rectangle.c:274
const Graphics_Display * display
The screen onto which drawing operations are performed.
Definition: grlib.h:197
This structure defines the characteristics of a Bitmap Image.
Definition: grlib.h:46
void * displayData
A pointer to display driver-specific data.
Definition: grlib.h:143
void Graphics_setForegroundColor(Graphics_Context *context, int32_t value)
Definition: context.c:221
void Graphics_clearDisplayOnDisplay(const Graphics_Display *display, uint16_t value)
Definition: display.c:204
uint32_t Graphics_translateColorOnDisplay(const Graphics_Display *display, uint32_t value)
Definition: display.c:168
void Graphics_clearDisplay(const Graphics_Context *context)
Definition: context.c:365
uint16_t xSize
xSize
Definition: grlib.h:49
uint8_t Graphics_getFontHeight(const Graphics_Font *font)
Definition: context.c:262
uint8_t format
The format of the font. Can be one of FONT_FMT_EX_UNCOMPRESSED or FONT_FMT_EX_PIXEL_RLE.
Definition: grlib.h:178
const uint16_t * offset
A pointer to a table containing the offset within data to the data for each character in the font...
Definition: grlib.h:184
void(*const pfnLineDrawH)(const Graphics_Display *pDisplay, int16_t lX1, int16_t lX2, int16_t lY, uint16_t ulValue)
A pointer to the function to draw a horizontal line on this display.
Definition: grlib.h:98
Graphics_Rectangle clipRegion
The clipping region to be used when drawing onto the screen.
Definition: grlib.h:198
uint8_t format
The format of the font. Can be one of FONT_FMT_UNCOMPRESSED or FONT_FMT_PIXEL_RLE.
Definition: grlib.h:156
void(*const pfnPixelDraw)(const Graphics_Display *pDisplay, int16_t lX, int16_t lY, uint16_t ulValue)
A pointer to the function to draw a pixel on this display.
Definition: grlib.h:84
uint8_t height
The height of the character cell; this may be taller than the font data for the characters (to provid...
Definition: grlib.h:158
void(*const pfnPixelDrawMultiple)(const Graphics_Display *pDisplay, int16_t lX, int16_t lY, int16_t lX0, int16_t lCount, int16_t lBPP, const uint8_t *pucData, const uint32_t *pucPalette)
A pointer to the function to draw multiple pixels on this display.
Definition: grlib.h:90
uint16_t Graphics_getHeightOfDisplay(const Graphics_Display *display)
Definition: context.c:330
int16_t xMin
The minimum X coordinate of the rectangle.
Definition: grlib.h:65
uint16_t ySize
ySize
Definition: grlib.h:50
int32_t size
The size of this structure.
Definition: grlib.h:142
void Graphics_drawRectangle(const Graphics_Context *context, const Graphics_Rectangle *rect)
Definition: rectangle.c:25
void Graphics_flushOnDisplay(const Graphics_Display *display)
Definition: display.c:186
void(*const pfnClearDisplay)(const Graphics_Display *pDisplay, uint16_t ulValue)
Definition: grlib.h:130
uint32_t Graphics_getOffscreen4BppImageSize(uint16_t width, uint16_t height)
Definition: image.c:389
const Graphics_Font * font
The font used to render text onto the screen.
Definition: grlib.h:201
uint16_t Graphics_getDisplayWidth(Graphics_Context *context)
Definition: context.c:296
uint16_t Graphics_getDisplayHeight(Graphics_Context *context)
Definition: context.c:313
uint32_t background
The background color used to draw primitives onto the screen.
Definition: grlib.h:200
uint8_t baseline
The offset between the top of the character cell and the baseline of the glyph. The baseline is the b...
Definition: grlib.h:159
uint16_t Graphics_getImageWidth(const Graphics_Image *image)
Definition: image.c:352
void Graphics_drawVerticalLineOnDisplay(const Graphics_Display *display, uint16_t x, uint16_t y1, uint16_t y2, uint16_t value)
Definition: display.c:118
void Graphics_drawCircle(const Graphics_Context *context, int32_t x, int32_t y, int32_t lRadius)
Definition: circle.c:26
This structure defines the implementation of a display driver.
Definition: grlib.h:79
void Graphics_fillRectangleOnDisplay(const Graphics_Display *display, const Graphics_Rectangle *rect, uint16_t value)
Definition: display.c:144
void Graphics_drawLineH(const Graphics_Context *context, int32_t x1, int32_t x2, int32_t y)
Definition: line.c:29
void Graphics_drawPixel(const Graphics_Context *context, uint16_t x, uint16_t y)
Definition: context.c:383
int16_t yMax
The maximum Y coordinate of the rectangle.
Definition: grlib.h:68
uint8_t bPP
Bits per pixel and Compressed/Uncompressed.
Definition: grlib.h:48
const Graphics_Display_Functions * pFxns
Implementation of this display.
Definition: grlib.h:146
void Graphics_initContext(Graphics_Context *context, Graphics_Display *display, const Graphics_Display_Functions *pFxns)
Definition: context.c:28
uint8_t maxWidth
The maximum width of a character; this is the width of the widest character in the font...
Definition: grlib.h:179
void Graphics_setFont(Graphics_Context *context, const Graphics_Font *font)
Definition: context.c:181
void Graphics_drawImage(const Graphics_Context *context, const Graphics_Image *pBitmap, int16_t x, int16_t y)
Definition: image.c:72
void Graphics_fillCircle(const Graphics_Context *context, int32_t x, int32_t y, int32_t lRadius)
Definition: circle.c:292
uint8_t Graphics_getStringBaseline(const Graphics_Context *context)
Definition: string.c:723
uint32_t(*const pfnColorTranslate)(const Graphics_Display *pDisplay, uint32_t ulValue)
Definition: grlib.h:117
uint8_t Graphics_getFontBaseline(const Graphics_Font *font)
Definition: context.c:203
void(*const pfnRectFill)(const Graphics_Display *pDisplay, const Graphics_Rectangle *pRect, uint16_t ulValue)
A pointer to the function to draw a filled rectangle on this display.
Definition: grlib.h:110
uint16_t Graphics_getImageHeight(const Graphics_Image *image)
Definition: image.c:336
const uint8_t * data
A pointer to the data for the font.
Definition: grlib.h:161
int16_t xMax
The maximum X coordinate of the rectangle.
Definition: grlib.h:67
uint8_t maxWidth
The maximum width of a character; this is the width of the widest character in the font...
Definition: grlib.h:157
uint8_t Graphics_getStringHeight(const Graphics_Context *context)
Definition: string.c:782
uint8_t Graphics_getFontMaxWidth(const Graphics_Font *font)
Definition: context.c:279
This structure describes a font used for drawing text onto the screen.
Definition: grlib.h:154
uint16_t Graphics_getImageColors(const Graphics_Image *image)
Definition: image.c:320
void Graphics_flushBuffer(const Graphics_Context *context)
Definition: context.c:349
int32_t Graphics_getStringWidth(const Graphics_Context *context, const int8_t *string, int32_t lLength)
Definition: string.c:59
void Graphics_setClipRegion(Graphics_Context *context, Graphics_Rectangle *rect)
Definition: context.c:90
void Graphics_drawMultiplePixelsOnDisplay(const Graphics_Display *display, uint16_t x, uint16_t y, uint16_t x0, uint16_t count, uint16_t bPP, const uint8_t *data, const uint32_t *pucPalette)
Definition: display.c:60
void Graphics_fillRectangle(const Graphics_Context *context, const Graphics_Rectangle *rect)
Definition: rectangle.c:96
void Graphics_drawPixelOnDisplay(const Graphics_Display *display, uint16_t x, uint16_t y, uint16_t value)
Definition: display.c:27
uint8_t first
The codepoint number representing the first character encoded in the font.
Definition: grlib.h:182
const uint8_t * pPixel
Pointer to pixel data;.
Definition: grlib.h:53