Data Structures | Macros | Typedefs | Functions | Variables
grlib.h File Reference
#include <stdint.h>
#include <stdbool.h>
#include "assert.h"

Go to the source code of this file.

Data Structures

struct  Graphics_Image
 This structure defines the characteristics of a Bitmap Image. More...
 
struct  Graphics_Rectangle
 
struct  Graphics_Display
 This structure defines the characteristics of a display driver. More...
 
struct  Graphics_Font
 This structure describes a font used for drawing text onto the screen. More...
 
struct  Graphics_FontEx
 
struct  Graphics_Context
 

Macros

#define NDEBUG
 
#define min(a, b)   (((a) < (b)) ? (a) : (b))
 
#define max(a, b)   (((a) < (b)) ? (b) : (a))
 
#define ClrAliceBlue   GRAPHICS_COLOR_ALICE_BLUE
 
#define ClrAntiqueWhite   GRAPHICS_COLOR_ANTIQUE_WHITE
 
#define ClrAqua   GRAPHICS_COLOR_AQUA
 
#define ClrAquamarine   GRAPHICS_COLOR_AQUAMARINE
 
#define ClrAzure   GRAPHICS_COLOR_AZURE
 
#define ClrBeige   GRAPHICS_COLOR_BEIGE
 
#define ClrBisque   GRAPHICS_COLOR_BISQUE
 
#define ClrBlack   GRAPHICS_COLOR_BLACK
 
#define ClrBlanchedAlmond   GRAPHICS_COLOR_BLANCHED_ALMOND
 
#define ClrBlue   GRAPHICS_COLOR_BLUE
 
#define ClrBlueViolet   GRAPHICS_COLOR_BLUE_VIOLET
 
#define ClrBrown   GRAPHICS_COLOR_BROWN
 
#define ClrBurlyWood   GRAPHICS_COLOR_BURLY_WOOD
 
#define ClrCadetBlue   GRAPHICS_COLOR_CADET_BLUE
 
#define ClrChartreuse   GRAPHICS_COLOR_CHARTREUSE
 
#define ClrChocolate   GRAPHICS_COLOR_CHOCOLATE
 
#define ClrCoral   GRAPHICS_COLOR_CORAL
 
#define ClrCornflowerBlue   GRAPHICS_COLOR_CORNFLOWER_BLUE
 
#define ClrCornsilk   GRAPHICS_COLOR_CORNSILK
 
#define ClrCrimson   GRAPHICS_COLOR_CRIMSON
 
#define ClrCyan   GRAPHICS_COLOR_CYAN
 
#define ClrDarkBlue   GRAPHICS_COLOR_DARK_BLUE
 
#define ClrDarkCyan   GRAPHICS_COLOR_DARK_CYAN
 
#define ClrDarkGoldenrod   GRAPHICS_COLOR_DARK_GOLDENROD
 
#define ClrDarkGray   GRAPHICS_COLOR_DARK_GRAY
 
#define ClrDarkGreen   GRAPHICS_COLOR_DARK_GREEN
 
#define ClrDarkKhaki   GRAPHICS_COLOR_DARK_KHAKI
 
#define ClrDarkMagenta   GRAPHICS_COLOR_DARK_MAGENTA
 
#define ClrDarkOliveGreen   GRAPHICS_COLOR_DARK_OLIVE_GREEN
 
#define ClrDarkOrange   GRAPHICS_COLOR_DARK_ORANGE
 
#define ClrDarkOrchid   GRAPHICS_COLOR_DARK_ORCHID
 
#define ClrDarkRed   GRAPHICS_COLOR_DARK_RED
 
#define ClrDarkSalmon   GRAPHICS_COLOR_DARK_SALMON
 
#define ClrDarkSeaGreen   GRAPHICS_COLOR_DARK_SEA_GREEN
 
#define ClrDarkSlateBlue   GRAPHICS_COLOR_DARK_SLATE_BLUE
 
#define ClrDarkSlateGray   GRAPHICS_COLOR_DARK_SLATE_GRAY
 
#define ClrDarkTurquoise   GRAPHICS_COLOR_DARK_TURQUOISE
 
#define ClrDarkViolet   GRAPHICS_COLOR_DARK_VIOLET
 
#define ClrDeepPink   GRAPHICS_COLOR_DEEP_PINK
 
#define ClrDeepSkyBlue   GRAPHICS_COLOR_DEEP_SKY_BLUE
 
#define ClrDimGray   GRAPHICS_COLOR_DIM_GRAY
 
#define ClrDodgerBlue   GRAPHICS_COLOR_DODGER_BLUE
 
#define ClrFireBrick   GRAPHICS_COLOR_FIRE_BRICK
 
#define ClrFloralWhite   GRAPHICS_COLOR_FLORAL_WHITE
 
#define ClrForestGreen   GRAPHICS_COLOR_FOREST_GREEN
 
#define ClrFuchsia   GRAPHICS_COLOR_FUCHSIA
 
#define ClrGainsboro   GRAPHICS_COLOR_GAINSBORO
 
#define ClrGhostWhite   GRAPHICS_COLOR_GHOST_WHITE
 
#define ClrGold   GRAPHICS_COLOR_GOLD
 
#define ClrGoldenrod   GRAPHICS_COLOR_GOLDENRON
 
#define ClrGray   GRAPHICS_COLOR_GRAY
 
#define ClrGreen   GRAPHICS_COLOR_GREEN
 
#define ClrGreenYellow   GRAPHICS_COLOR_GREEN_YELLOW
 
#define ClrHoneydew   GRAPHICS_COLOR_HONEYDEW
 
#define ClrHotPink   GRAPHICS_COLOR_HOT_PINK
 
#define ClrIndianRed   GRAPHICS_COLOR_INDIAN_RED
 
#define ClrIndigo   GRAPHICS_COLOR_INDIGO
 
#define ClrIvory   GRAPHICS_COLOR_IVORY
 
#define ClrKhaki   GRAPHICS_COLOR_KHAKI
 
#define ClrLavender   GRAPHICS_COLOR_LAVENDER
 
#define ClrLavenderBlush   GRAPHICS_COLOR_LAVENDER_BLUSH
 
#define ClrLawnGreen   GRAPHICS_COLOR_LAWN_GREEN
 
#define ClrLemonChiffon   GRAPHICS_COLOR_LEMON_CHIFFON
 
#define ClrLightBlue   GRAPHICS_COLOR_LIGHT_BLUE
 
#define ClrLightCoral   GRAPHICS_COLOR_LIGHT_CORAL
 
#define ClrLightCyan   GRAPHICS_COLOR_LIGHT_CYAN
 
#define ClrLightGoldenrodYellow   GRAPHICS_COLOR_LIGHT_GOLDENRON_YELLOW
 
#define ClrLightGreen   GRAPHICS_COLOR_LIGHT_GREEN
 
#define ClrLightGrey   GRAPHICS_COLOR_LIGHT_GRAY
 
#define ClrLightPink   GRAPHICS_COLOR_LIGHT_PINK
 
#define ClrLightSalmon   GRAPHICS_COLOR_LIGHT_SALMON
 
#define ClrLightSeaGreen   GRAPHICS_COLOR_LIGHT_SEA_GREEN
 
#define ClrLightSkyBlue   GRAPHICS_COLOR_LIGHT_SKY_BLUE
 
#define ClrLightSlateGray   GRAPHICS_COLOR_LIGHT_SLATE_GRAY
 
#define ClrLightSteelBlue   GRAPHICS_COLOR_LIGHT_STEEL_BLUE
 
#define ClrLightYellow   GRAPHICS_COLOR_LIGHT_YELLOW
 
#define ClrLime   GRAPHICS_COLOR_LIME
 
#define ClrLimeGreen   GRAPHICS_COLOR_LIME_GREEN
 
#define ClrLinen   GRAPHICS_COLOR_LINEN
 
#define ClrMagenta   GRAPHICS_COLOR_MAGENTA
 
#define ClrMaroon   GRAPHICS_COLOR_MAROON
 
#define ClrMediumAquamarine   GRAPHICS_COLOR_MEDIUM_AQUAMARINE
 
#define ClrMediumBlue   GRAPHICS_COLOR_MEDIUM_BLUE
 
#define ClrMediumOrchid   GRAPHICS_COLOR_MEDIUM_ORCHID
 
#define ClrMediumPurple   GRAPHICS_COLOR_MEDIUM_PURPLE
 
#define ClrMediumSeaGreen   GRAPHICS_COLOR_MEDIUM_SEA_GREEN
 
#define ClrMediumSlateBlue   GRAPHICS_COLOR_MEDIUM_SLATE_BLUE
 
#define ClrMediumSpringGreen   GRAPHICS_COLOR_MEDIUM_SPRING_GREEN
 
#define ClrMediumTurquoise   GRAPHICS_COLOR_MEDIUM_TURQUOISE
 
#define ClrMediumVioletRed   GRAPHICS_COLOR_MEDIUM_VIOLET_RED
 
#define ClrMidnightBlue   GRAPHICS_COLOR_MIGNIGHT_BLUE
 
#define ClrMintCream   GRAPHICS_COLOR_MINT_CREAM
 
#define ClrMistyRose   GRAPHICS_COLOR_MISTY_ROSE
 
#define ClrMoccasin   GRAPHICS_COLOR_MOCCASIN
 
#define ClrNavajoWhite   GRAPHICS_COLOR_NAVAJO_WHITE
 
#define ClrNavy   GRAPHICS_COLOR_NAVY
 
#define ClrOldLace   GRAPHICS_COLOR_OLD_LACE
 
#define ClrOlive   GRAPHICS_COLOR_OLIVE
 
#define ClrOliveDrab   GRAPHICS_COLOR_OLIVE_DRAB
 
#define ClrOrange   GRAPHICS_COLOR_ORANGE
 
#define ClrOrangeRed   GRAPHICS_COLOR_ORANGE_RED
 
#define ClrOrchid   GRAPHICS_COLOR_ORCHID
 
#define ClrPaleGoldenrod   GRAPHICS_COLOR_PALE_GOLDENRON
 
#define ClrPaleGreen   GRAPHICS_COLOR_PALE_GREEN
 
#define ClrPaleTurquoise   GRAPHICS_COLOR_PALE_TURQUOISE
 
#define ClrPaleVioletRed   GRAPHICS_COLOR_PALE_VIOLET_RED
 
#define ClrPapayaWhip   GRAPHICS_COLOR_PAPAYA_WHIP
 
#define ClrPeachPuff   GRAPHICS_COLOR_PEACH_PUFF
 
#define ClrPeru   GRAPHICS_COLOR_PERU
 
#define ClrPink   GRAPHICS_COLOR_PINK
 
#define ClrPlum   GRAPHICS_COLOR_PLUM
 
#define ClrPowderBlue   GRAPHICS_COLOR_POWDER_BLUE
 
#define ClrPurple   GRAPHICS_COLOR_PURPLE
 
#define ClrRed   GRAPHICS_COLOR_RED
 
#define ClrRosyBrown   GRAPHICS_COLOR_ROSY_BROWN
 
#define ClrRoyalBlue   GRAPHICS_COLOR_ROYAL_BLUE
 
#define ClrSaddleBrown   GRAPHICS_COLOR_SADDLE_BROWN
 
#define ClrSalmon   GRAPHICS_COLOR_SALMON
 
#define ClrSandyBrown   GRAPHICS_COLOR_SANDY_BROWN
 
#define ClrSeaGreen   GRAPHICS_COLOR_SEA_GREEN
 
#define ClrSeashell   GRAPHICS_COLOR_SEASHELL
 
#define ClrSienna   GRAPHICS_COLOR_SIENNA
 
#define ClrSilver   GRAPHICS_COLOR_SILVER
 
#define ClrSkyBlue   GRAPHICS_COLOR_SKY_BLUE
 
#define ClrSlateBlue   GRAPHICS_COLOR_SLATE_BLUE
 
#define ClrSlateGray   GRAPHICS_COLOR_SLATE_GRAY
 
#define ClrSnow   GRAPHICS_COLOR_SNOW
 
#define ClrSpringGreen   GRAPHICS_COLOR_SPRING_GREEN
 
#define ClrSteelBlue   GRAPHICS_COLOR_STEEL_BLUE
 
#define ClrTan   GRAPHICS_COLOR_TAN
 
#define ClrTeal   GRAPHICS_COLOR_TEAL
 
#define ClrThistle   GRAPHICS_COLOR_THISTLE
 
#define ClrTomato   GRAPHICS_COLOR_TOMATO
 
#define ClrTurquoise   GRAPHICS_COLOR_TURQUOISE
 
#define ClrViolet   GRAPHICS_COLOR_VIOLET
 
#define ClrWheat   GRAPHICS_COLOR_WHEAT
 
#define ClrWhite   GRAPHICS_COLOR_WHITE
 
#define ClrWhiteSmoke   GRAPHICS_COLOR_WHITE_SMOKE
 
#define ClrYellow   GRAPHICS_COLOR_YELLOW
 
#define ClrYellowGreen   GRAPHICS_COLOR_YELLOW_GREEN
 
#define ClrBlack   GRAPHICS_COLOR_BLACK
 
#define FONT_FMT_UNCOMPRESSED   GRAPHICS_FONT_FMT_UNCOMPRESSED
 
#define FONT_FMT_PIXEL_RLE   GRAPHICS_FONT_FMT_PIXEL_RLE
 
#define FONT_EX_MARKER   GRAPHICS_FONT_EX_MARKER
 
#define FONT_FMT_EX_UNCOMPRESSED   GRAPHICS_FONT_FMT_EX_UNCOMPRESSED
 
#define FONT_FMT_EX_PIXEL_RLE   GRAPHICS_FONT_FMT_EX_PIXEL_RLE
 
#define AUTO_STRING_LENGTH   GRAPHICS_AUTO_STRING_LENGTH
 
#define OPAQUE_TEXT   GRAPHICS_OPAQUE_TEXT
 
#define TRANSPARENT_TEXT   GRAPHICS_TRANSPARENT_TEXT
 
#define IMAGE_FMT_1BPP_UNCOMP   GRAPHICS_IMAGE_FMT_1BPP_UNCOMP
 
#define IMAGE_FMT_2BPP_UNCOMP   GRAPHICS_IMAGE_FMT_2BPP_UNCOMP
 
#define IMAGE_FMT_4BPP_UNCOMP   GRAPHICS_IMAGE_FMT_4BPP_UNCOMP
 
#define IMAGE_FMT_8BPP_UNCOMP   GRAPHICS_IMAGE_FMT_8BPP_UNCOMP
 
#define IMAGE_FMT_1BPP_COMP_RLE4   GRAPHICS_IMAGE_FMT_1BPP_COMP_RLE4
 
#define IMAGE_FMT_2BPP_UNCOMP   GRAPHICS_IMAGE_FMT_2BPP_UNCOMP
 
#define IMAGE_FMT_4BPP_COMP_RLE4   GRAPHICS_IMAGE_FMT_4BPP_COMP_RLE4
 
#define IMAGE_FMT_1BPP_COMP_RLE8   GRAPHICS_IMAGE_FMT_1BPP_COMP_RLE8
 
#define IMAGE_FMT_2BPP_COMP_RLE8   GRAPHICS_IMAGE_FMT_2BPP_COMP_RLE8
 
#define IMAGE_FMT_4BPP_COMP_RLE8   GRAPHICS_IMAGE_FMT_4BPP_COMP_RLE8
 
#define IMAGE_FMT_8BPP_COMP_RLE8   GRAPHICS_IMAGE_FMT_8BPP_COMP_RLE8
 
#define IMAGE_FMT_8BPP_COMP_RLEBLEND   GRAPHICS_IMAGE_FMT_8BPP_COMP_RLEBLEND
 
#define tFontEx   Graphics_FontEx
 
#define tFont   Graphics_Font
 
#define tDisplay   Graphics_Display
 
#define tRectangle   Graphics_Rectangle
 
#define tImage   Graphics_Image
 
#define tContext   Graphics_Context
 
#define sXMax   xMax
 
#define sXMin   xMin
 
#define sYMax   yMax
 
#define sYMin   yMin
 
#define GrCircleDraw   Graphics_drawCircle
 
#define GrCircleFill   Graphics_fillCircle
 
#define GrContextClipRegionSet   Graphics_setClipRegion
 
#define GrContextInit   Graphics_initContext
 
#define GrImageDraw   Graphics_drawImage
 
#define GrLineDraw   Graphics_drawLine
 
#define GrLineDrawH   Graphics_drawLineH
 
#define GrLineDrawV   Graphics_drawLineV
 
#define GrRectDraw   Graphics_drawRectangle
 
#define GrRectFill   Graphics_fillRectangle
 
#define GrStringDraw   Graphics_drawString
 
#define GrStringWidthGet   Graphics_getStringWidth
 
#define GrRectOverlapCheck   Graphics_isOverlappingRectangle
 
#define GrRectIntersectGet   Graphics_getRectangleIntersection
 
#define GrContextBackgroundSet   Graphics_setBackgroundColor
 
#define GrContextBackgroundSetTranslated   Graphics_setBackgroundColorTranslated
 
#define GrContextDpyWidthGet   Graphics_getDisplayWidth
 
#define GrContextDpyHeightGet   Graphics_getDisplayHeight
 
#define GrContextFontSet   Graphics_setFont
 
#define GrContextForegroundSet   Graphics_setForegroundColor
 
#define GrContextForegroundSetTranslated   Graphics_setForegroundColorTranslated
 
#define GrFlush   Graphics_flushBuffer
 
#define GrClearDisplay   Graphics_clearDisplay
 
#define GrFontBaselineGet   Graphics_getFontBaseline
 
#define GrFontHeightGet   Graphics_getFontHeight
 
#define GrFontMaxWidthGet   Graphics_getFontMaxWidth
 
#define GrImageColorsGet   Graphics_getImageColors
 
#define GrImageHeightGet   Graphics_getImageHeight
 
#define GrImageWidthGet   Graphics_getImageWidth
 
#define GrOffScreen1BPPSize   Graphics_getOffscreen1BppImageSize
 
#define GrOffScreen4BPPSize   Graphics_getOffscreen4BppImageSize
 
#define GrOffScreen8BPPSize   Graphics_getOffscreen8BppImageSize
 
#define GrPixelDraw   Graphics_drawPixel
 
#define GrStringBaselineGet   Graphics_getStringBaseline
 
#define GrStringDrawCentered   Graphics_drawStringCentered
 
#define GrStringHeightGet   Graphics_getStringHeight
 
#define GrStringMaxWidthGet   Graphics_getStringMaxWidth
 
#define DpyColorTranslate   Graphics_translateColorOnDisplay
 
#define DpyFlush   Graphics_flushOnDisplay
 
#define DpyClearDisplay   Graphics_clearDisplayOnDisplay
 
#define DpyHeightGet   Graphics_getHeightOfDisplay
 
#define DpyLineDrawH   Graphics_drawHorizontalLineOnDisplay
 
#define DpyLineDrawV   Graphics_drawVerticalLineOnDisplay
 
#define DpyPixelDraw   Graphics_drawPixelOnDisplay
 
#define DpyPixelDrawMultiple   Graphics_drawMultiplePixelsOnDisplay
 
#define DpyRectFill   Graphics_fillRectangleOnDisplay
 
#define DpyWidthGet   Graphics_getWidthOfDisplay
 
#define GrRectContainsPoint   Graphics_isPointWithinRectangle
 
#define GRAPHICS_FONT_FMT_UNCOMPRESSED   0x00
 Indicates that the font data is stored in an uncompressed format. More...
 
#define GRAPHICS_FONT_FMT_PIXEL_RLE   0x01
 Indicates that the font data is stored using a pixel-based RLE format. More...
 
#define GRAPHICS_FONT_EX_MARKER   0x80
 
#define GRAPHICS_FONT_FMT_EX_UNCOMPRESSED   (FONT_FMT_UNCOMPRESSED | FONT_EX_MARKER)
 
#define GRAPHICS_FONT_FMT_EX_PIXEL_RLE   (FONT_FMT_PIXEL_RLE | FONT_EX_MARKER)
 
#define GRAPHICS_AUTO_STRING_LENGTH   -1
 
#define GRAPHICS_OPAQUE_TEXT   1
 
#define GRAPHICS_TRANSPARENT_TEXT   0
 
#define GRAPHICS_IMAGE_FMT_1BPP_UNCOMP   0x01
 
#define GRAPHICS_IMAGE_FMT_2BPP_UNCOMP   0x02
 
#define GRAPHICS_IMAGE_FMT_4BPP_UNCOMP   0x04
 
#define GRAPHICS_IMAGE_FMT_8BPP_UNCOMP   0x08
 
#define GRAPHICS_IMAGE_FMT_1BPP_COMP_RLE4   0x41
 
#define GRAPHICS_IMAGE_FMT_2BPP_COMP_RLE4   0x42
 
#define GRAPHICS_IMAGE_FMT_4BPP_COMP_RLE4   0x44
 
#define GRAPHICS_IMAGE_FMT_1BPP_COMP_RLE8   0x81
 
#define GRAPHICS_IMAGE_FMT_2BPP_COMP_RLE8   0x82
 
#define GRAPHICS_IMAGE_FMT_4BPP_COMP_RLE8   0x84
 
#define GRAPHICS_IMAGE_FMT_8BPP_COMP_RLE8   0x88
 
#define GRAPHICS_IMAGE_FMT_8BPP_COMP_RLEBLEND   0x28
 
#define GRAPHICS_COLOR_ALICE_BLUE   0x00F0F8FF
 
#define GRAPHICS_COLOR_ANTIQUE_WHITE   0x00FAEBD7
 
#define GRAPHICS_COLOR_AQUA   0x0000FFFF
 
#define GRAPHICS_COLOR_AQUAMARINE   0x007FFFD4
 
#define GRAPHICS_COLOR_AZURE   0x00F0FFFF
 
#define GRAPHICS_COLOR_BEIGE   0x00F5F5DC
 
#define GRAPHICS_COLOR_BISQUE   0x00FFE4C4
 
#define GRAPHICS_COLOR_BLACK   0x00000000
 
#define GRAPHICS_COLOR_BLANCHED_ALMOND   0x00FFEBCD
 
#define GRAPHICS_COLOR_BLUE   0x000000FF
 
#define GRAPHICS_COLOR_BLUE_VIOLET   0x008A2BE2
 
#define GRAPHICS_COLOR_BROWN   0x00A52A2A
 
#define GRAPHICS_COLOR_BURLY_WOOD   0x00DEB887
 
#define GRAPHICS_COLOR_CADET_BLUE   0x005F9EA0
 
#define GRAPHICS_COLOR_CHARTREUSE   0x007FFF00
 
#define GRAPHICS_COLOR_CHOCOLATE   0x00D2691E
 
#define GRAPHICS_COLOR_CORAL   0x00FF7F50
 
#define GRAPHICS_COLOR_CORNFLOWER_BLUE   0x006495ED
 
#define GRAPHICS_COLOR_CORNSILK   0x00FFF8DC
 
#define GRAPHICS_COLOR_CRIMSON   0x00DC143C
 
#define GRAPHICS_COLOR_CYAN   0x0000FFFF
 
#define GRAPHICS_COLOR_DARK_BLUE   0x0000008B
 
#define GRAPHICS_COLOR_DARK_CYAN   0x00008B8B
 
#define GRAPHICS_COLOR_DARK_GOLDENROD   0x00B8860B
 
#define GRAPHICS_COLOR_DARK_GRAY   0x00A9A9A9
 
#define GRAPHICS_COLOR_DARK_GREEN   0x00006400
 
#define GRAPHICS_COLOR_DARK_KHAKI   0x00BDB76B
 
#define GRAPHICS_COLOR_DARK_MAGENTA   0x008B008B
 
#define GRAPHICS_COLOR_DARK_OLIVE_GREEN   0x00556B2F
 
#define GRAPHICS_COLOR_DARK_ORANGE   0x00FF8C00
 
#define GRAPHICS_COLOR_DARK_ORCHID   0x009932CC
 
#define GRAPHICS_COLOR_DARK_RED   0x008B0000
 
#define GRAPHICS_COLOR_DARK_SALMON   0x00E9967A
 
#define GRAPHICS_COLOR_DARK_SEA_GREEN   0x008FBC8F
 
#define GRAPHICS_COLOR_DARK_SLATE_BLUE   0x00483D8B
 
#define GRAPHICS_COLOR_DARK_SLATE_GRAY   0x002F4F4F
 
#define GRAPHICS_COLOR_DARK_TURQUOISE   0x0000CED1
 
#define GRAPHICS_COLOR_DARK_VIOLET   0x009400D3
 
#define GRAPHICS_COLOR_DEEP_PINK   0x00FF1493
 
#define GRAPHICS_COLOR_DEEP_SKY_BLUE   0x0000BFFF
 
#define GRAPHICS_COLOR_DIM_GRAY   0x00696969
 
#define GRAPHICS_COLOR_DODGER_BLUE   0x001E90FF
 
#define GRAPHICS_COLOR_FIRE_BRICK   0x00B22222
 
#define GRAPHICS_COLOR_FLORAL_WHITE   0x00FFFAF0
 
#define GRAPHICS_COLOR_FOREST_GREEN   0x00228B22
 
#define GRAPHICS_COLOR_FUCHSIA   0x00FF00FF
 
#define GRAPHICS_COLOR_GAINSBORO   0x00DCDCDC
 
#define GRAPHICS_COLOR_GHOST_WHITE   0x00F8F8FF
 
#define GRAPHICS_COLOR_GOLD   0x00FFD700
 
#define GRAPHICS_COLOR_GOLDENRON   0x00DAA520
 
#define GRAPHICS_COLOR_GRAY   0x00808080
 
#define GRAPHICS_COLOR_GREEN   0x00008000
 
#define GRAPHICS_COLOR_GREEN_YELLOW   0x00ADFF2F
 
#define GRAPHICS_COLOR_HONEYDEW   0x00F0FFF0
 
#define GRAPHICS_COLOR_HOT_PINK   0x00FF69B4
 
#define GRAPHICS_COLOR_INDIAN_RED   0x00CD5C5C
 
#define GRAPHICS_COLOR_INDIGO   0x004B0082
 
#define GRAPHICS_COLOR_IVORY   0x00FFFFF0
 
#define GRAPHICS_COLOR_KHAKI   0x00F0E68C
 
#define GRAPHICS_COLOR_LAVENDER   0x00E6E6FA
 
#define GRAPHICS_COLOR_LAVENDER_BLUSH   0x00FFF0F5
 
#define GRAPHICS_COLOR_LAWN_GREEN   0x007CFC00
 
#define GRAPHICS_COLOR_LEMON_CHIFFON   0x00FFFACD
 
#define GRAPHICS_COLOR_LIGHT_BLUE   0x00ADD8E6
 
#define GRAPHICS_COLOR_LIGHT_CORAL   0x00F08080
 
#define GRAPHICS_COLOR_LIGHT_CYAN   0x00E0FFFF
 
#define GRAPHICS_COLOR_LIGHT_GOLDENRON_YELLOW   0x00FAFAD2
 
#define GRAPHICS_COLOR_LIGHT_GREEN   0x0090EE90
 
#define GRAPHICS_COLOR_LIGHT_GRAY   0x00D3D3D3
 
#define GRAPHICS_COLOR_LIGHT_PINK   0x00FFB6C1
 
#define GRAPHICS_COLOR_LIGHT_SALMON   0x00FFA07A
 
#define GRAPHICS_COLOR_LIGHT_SEA_GREEN   0x0020B2AA
 
#define GRAPHICS_COLOR_LIGHT_SKY_BLUE   0x0087CEFA
 
#define GRAPHICS_COLOR_LIGHT_SLATE_GRAY   0x00778899
 
#define GRAPHICS_COLOR_LIGHT_STEEL_BLUE   0x00B0C4DE
 
#define GRAPHICS_COLOR_LIGHT_YELLOW   0x00FFFFE0
 
#define GRAPHICS_COLOR_LIME   0x0000FF00
 
#define GRAPHICS_COLOR_LIME_GREEN   0x0032CD32
 
#define GRAPHICS_COLOR_LINEN   0x00FAF0E6
 
#define GRAPHICS_COLOR_MAGENTA   0x00FF00FF
 
#define GRAPHICS_COLOR_MAROON   0x00800000
 
#define GRAPHICS_COLOR_MEDIUM_AQUAMARINE   0x0066CDAA
 
#define GRAPHICS_COLOR_MEDIUM_BLUE   0x000000CD
 
#define GRAPHICS_COLOR_MEDIUM_ORCHID   0x00BA55D3
 
#define GRAPHICS_COLOR_MEDIUM_PURPLE   0x009370DB
 
#define GRAPHICS_COLOR_MEDIUM_SEA_GREEN   0x003CB371
 
#define GRAPHICS_COLOR_MEDIUM_SLATE_BLUE   0x007B68EE
 
#define GRAPHICS_COLOR_MEDIUM_SPRING_GREEN   0x0000FA9A
 
#define GRAPHICS_COLOR_MEDIUM_TURQUOISE   0x0048D1CC
 
#define GRAPHICS_COLOR_MEDIUM_VIOLET_RED   0x00C71585
 
#define GRAPHICS_COLOR_MIGNIGHT_BLUE   0x00191970
 
#define GRAPHICS_COLOR_MINT_CREAM   0x00F5FFFA
 
#define GRAPHICS_COLOR_MISTY_ROSE   0x00FFE4E1
 
#define GRAPHICS_COLOR_MOCCASIN   0x00FFE4B5
 
#define GRAPHICS_COLOR_NAVAJO_WHITE   0x00FFDEAD
 
#define GRAPHICS_COLOR_NAVY   0x00000080
 
#define GRAPHICS_COLOR_OLD_LACE   0x00FDF5E6
 
#define GRAPHICS_COLOR_OLIVE   0x00808000
 
#define GRAPHICS_COLOR_OLIVE_DRAB   0x006B8E23
 
#define GRAPHICS_COLOR_ORANGE   0x00FFA500
 
#define GRAPHICS_COLOR_ORANGE_RED   0x00FF4500
 
#define GRAPHICS_COLOR_ORCHID   0x00DA70D6
 
#define GRAPHICS_COLOR_PALE_GOLDENRON   0x00EEE8AA
 
#define GRAPHICS_COLOR_PALE_GREEN   0x0098FB98
 
#define GRAPHICS_COLOR_PALE_TURQUOISE   0x00AFEEEE
 
#define GRAPHICS_COLOR_PALE_VIOLET_RED   0x00DB7093
 
#define GRAPHICS_COLOR_PAPAYA_WHIP   0x00FFEFD5
 
#define GRAPHICS_COLOR_PEACH_PUFF   0x00FFDAB9
 
#define GRAPHICS_COLOR_PERU   0x00CD853F
 
#define GRAPHICS_COLOR_PINK   0x00FFC0CB
 
#define GRAPHICS_COLOR_PLUM   0x00DDA0DD
 
#define GRAPHICS_COLOR_POWDER_BLUE   0x00B0E0E6
 
#define GRAPHICS_COLOR_PURPLE   0x00800080
 
#define GRAPHICS_COLOR_RED   0x00FF0000
 
#define GRAPHICS_COLOR_ROSY_BROWN   0x00BC8F8F
 
#define GRAPHICS_COLOR_ROYAL_BLUE   0x004169E1
 
#define GRAPHICS_COLOR_SADDLE_BROWN   0x008B4513
 
#define GRAPHICS_COLOR_SALMON   0x00FA8072
 
#define GRAPHICS_COLOR_SANDY_BROWN   0x00F4A460
 
#define GRAPHICS_COLOR_SEA_GREEN   0x002E8B57
 
#define GRAPHICS_COLOR_SEASHELL   0x00FFF5EE
 
#define GRAPHICS_COLOR_SIENNA   0x00A0522D
 
#define GRAPHICS_COLOR_SILVER   0x00C0C0C0
 
#define GRAPHICS_COLOR_SKY_BLUE   0x0087CEEB
 
#define GRAPHICS_COLOR_SLATE_BLUE   0x006A5ACD
 
#define GRAPHICS_COLOR_SLATE_GRAY   0x00708090
 
#define GRAPHICS_COLOR_SNOW   0x00FFFAFA
 
#define GRAPHICS_COLOR_SPRING_GREEN   0x0000FF7F
 
#define GRAPHICS_COLOR_STEEL_BLUE   0x004682B4
 
#define GRAPHICS_COLOR_TAN   0x00D2B48C
 
#define GRAPHICS_COLOR_TEAL   0x00008080
 
#define GRAPHICS_COLOR_THISTLE   0x00D8BFD8
 
#define GRAPHICS_COLOR_TOMATO   0x00FF6347
 
#define GRAPHICS_COLOR_TURQUOISE   0x0040E0D0
 
#define GRAPHICS_COLOR_VIOLET   0x00EE82EE
 
#define GRAPHICS_COLOR_WHEAT   0x00F5DEB3
 
#define GRAPHICS_COLOR_WHITE   0x00FFFFFF
 
#define GRAPHICS_COLOR_WHITE_SMOKE   0x00F5F5F5
 
#define GRAPHICS_COLOR_YELLOW   0x00FFFF00
 
#define GRAPHICS_COLOR_YELLOW_GREEN   0x009ACD32
 
#define GRAPHICS_COLOR_BLACK   0x00000000
 
#define ClrRedMask   0x00FF0000
 
#define ClrRedShift   16
 
#define ClrGreenMask   0x0000FF00
 
#define ClrGreenShift   8
 
#define ClrBlueMask   0x000000FF
 
#define ClrBlueShift   0
 
#define GrLangZhPRC   0x0804
 
#define GrLangZhTW   0x0404
 
#define GrLangEnUS   0x0409
 
#define GrLangEnUK   0x0809
 
#define GrLangEnAUS   0x0C09
 
#define GrLangEnCA   0x1009
 
#define GrLangEnNZ   0x1409
 
#define GrLangFr   0x040C
 
#define GrLangDe   0x0407
 
#define GrLangHi   0x0439
 
#define GrLangIt   0x0410
 
#define GrLangJp   0x0411
 
#define GrLangKo   0x0412
 
#define GrLangEsMX   0x080A
 
#define GrLangEsSP   0x0C0A
 
#define GrLangSwKE   0x0441
 
#define GrLangUrIN   0x0820
 
#define GrLangUrPK   0x0420
 

Typedefs

typedef struct Graphics_Image Graphics_Image
 This structure defines the characteristics of a Bitmap Image. More...
 
typedef struct Graphics_Rectangle Graphics_Rectangle
 
typedef struct Graphics_Display Graphics_Display
 This structure defines the characteristics of a display driver. More...
 
typedef struct Graphics_Font Graphics_Font
 This structure describes a font used for drawing text onto the screen. More...
 
typedef struct Graphics_FontEx Graphics_FontEx
 
typedef struct Graphics_Context Graphics_Context
 

Functions

void Graphics_drawCircle (const Graphics_Context *context, int32_t x, int32_t y, int32_t lRadius)
 
void Graphics_fillCircle (const Graphics_Context *context, int32_t x, int32_t y, int32_t lRadius)
 
void Graphics_setClipRegion (Graphics_Context *context, Graphics_Rectangle *rect)
 
void Graphics_initContext (Graphics_Context *context, const Graphics_Display *display)
 
void Graphics_drawImage (const Graphics_Context *context, const Graphics_Image *pBitmap, int16_t x, int16_t y)
 
void Graphics_drawLine (const Graphics_Context *context, int32_t x1, int32_t y1, int32_t x2, int32_t y2)
 
void Graphics_drawLineH (const Graphics_Context *context, int32_t x1, int32_t x2, int32_t y)
 
void Graphics_drawLineV (const Graphics_Context *context, int32_t x, int32_t y1, int32_t y2)
 
void Graphics_drawRectangle (const Graphics_Context *context, const Graphics_Rectangle *rect)
 
void Graphics_fillRectangle (const Graphics_Context *context, const Graphics_Rectangle *rect)
 
void Graphics_drawString (const Graphics_Context *context, int8_t *string, int32_t lLength, int32_t x, int32_t y, bool opaque)
 
int32_t Graphics_getStringWidth (const Graphics_Context *context, const int8_t *string, int32_t lLength)
 
int32_t Graphics_isOverlappingRectangle (Graphics_Rectangle *psRect1, Graphics_Rectangle *psRect2)
 
int32_t Graphics_getRectangleIntersection (Graphics_Rectangle *psRect1, Graphics_Rectangle *psRect2, Graphics_Rectangle *psIntersect)
 
void Graphics_setBackgroundColor (Graphics_Context *context, int32_t value)
 
uint16_t Graphics_getDisplayWidth (Graphics_Context *context)
 
uint16_t Graphics_getDisplayHeight (Graphics_Context *context)
 
void Graphics_setFont (Graphics_Context *context, const Graphics_Font *font)
 
uint8_t Graphics_getFontBaseline (const Graphics_Font *font)
 
void Graphics_setForegroundColor (Graphics_Context *context, int32_t value)
 
void Graphics_setForegroundColorTranslated (Graphics_Context *context, int32_t value)
 
uint8_t Graphics_getFontHeight (const Graphics_Font *font)
 
uint8_t Graphics_getFontMaxWidth (const Graphics_Font *font)
 
uint16_t Graphics_getImageColors (const Graphics_Image *image)
 
uint16_t Graphics_getImageHeight (const Graphics_Image *image)
 
uint16_t Graphics_getImageWidth (const Graphics_Image *image)
 
uint32_t Graphics_getOffscreen1BppImageSize (uint16_t width, uint16_t height)
 
uint32_t Graphics_getOffscreen4BppImageSize (uint16_t width, uint16_t height)
 
uint32_t Graphics_getOffScreen8BPPSize (uint16_t width, uint16_t height)
 
void Graphics_drawStringCentered (const Graphics_Context *context, int8_t *string, int32_t length, int32_t x, int32_t y, bool opaque)
 
uint8_t Graphics_getStringHeight (const Graphics_Context *context)
 
uint8_t Graphics_getStringMaxWidth (const Graphics_Context *context)
 
uint8_t Graphics_getStringBaseline (const Graphics_Context *context)
 
uint32_t Graphics_translateColorOnDisplay (const Graphics_Display *display, uint32_t value)
 
void Graphics_drawHorizontalLineOnDisplay (const Graphics_Display *display, uint16_t x1, uint16_t x2, uint16_t y, uint32_t value)
 
void Graphics_drawVerticalLineOnDisplay (const Graphics_Display *display, uint16_t x, uint16_t y1, uint16_t y2, uint16_t value)
 
void Graphics_fillRectangleOnDisplay (const Graphics_Display *display, const Graphics_Rectangle *rect, uint16_t value)
 
void Graphics_flushOnDisplay (const Graphics_Display *display)
 
void Graphics_drawPixel (const Graphics_Context *context, uint16_t x, uint16_t y)
 
void Graphics_clearDisplay (const Graphics_Context *context)
 
uint16_t Graphics_getHeightOfDisplay (const Graphics_Display *display)
 
void Graphics_flushBuffer (const Graphics_Context *context)
 
uint16_t Graphics_getWidthOfDisplay (const Graphics_Display *display)
 
bool Graphics_isPointWithinRectangle (const Graphics_Rectangle *rect, uint16_t x, uint16_t y)
 
void Graphics_drawPixelOnDisplay (const Graphics_Display *display, uint16_t x, uint16_t y, uint16_t value)
 
void Graphics_clearDisplayOnDisplay (const Graphics_Display *display, uint16_t value)
 
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)
 
void Graphics_initOffscreen1BppImage (Graphics_Display *display, uint8_t *image, int32_t width, int32_t height)
 
void Graphics_initOffscreen4BppImage (Graphics_Display *display, uint8_t *image, int32_t width, int32_t height)
 
void Graphics_setOffscreen4BppPalette (Graphics_Display *display, uint32_t *ppalette, uint32_t offset, uint32_t count)
 
void Graphics_initOffscreen8BppImage (Graphics_Display *display, uint8_t *image, int32_t width, int32_t height)
 
void Graphics_setOffscreen8BppPalette (Graphics_Display *display, uint32_t *ppalette, uint32_t offset, uint32_t count)
 

Variables

const Graphics_Font g_sFontCm12
 
const Graphics_Font g_sFontCm12b
 
const Graphics_Font g_sFontCm12i
 
const Graphics_Font g_sFontCm14
 
const Graphics_Font g_sFontCm14b
 
const Graphics_Font g_sFontCm14i
 
const Graphics_Font g_sFontCm16
 
const Graphics_Font g_sFontCm16b
 
const Graphics_Font g_sFontCm16i
 
const Graphics_Font g_sFontCm18
 
const Graphics_Font g_sFontCm18b
 
const Graphics_Font g_sFontCm18i
 
const Graphics_Font g_sFontCm20
 
const Graphics_Font g_sFontCm20b
 
const Graphics_Font g_sFontCm20i
 
const Graphics_Font g_sFontCm22
 
const Graphics_Font g_sFontCm22b
 
const Graphics_Font g_sFontCm22i
 
const Graphics_Font g_sFontCm24
 
const Graphics_Font g_sFontCm24b
 
const Graphics_Font g_sFontCm24i
 
const Graphics_Font g_sFontCm26
 
const Graphics_Font g_sFontCm26b
 
const Graphics_Font g_sFontCm26i
 
const Graphics_Font g_sFontCm28
 
const Graphics_Font g_sFontCm28b
 
const Graphics_Font g_sFontCm28i
 
const Graphics_Font g_sFontCm30
 
const Graphics_Font g_sFontCm30b
 
const Graphics_Font g_sFontCm30i
 
const Graphics_Font g_sFontCm32
 
const Graphics_Font g_sFontCm32b
 
const Graphics_Font g_sFontCm32i
 
const Graphics_Font g_sFontCm34
 
const Graphics_Font g_sFontCm34b
 
const Graphics_Font g_sFontCm34i
 
const Graphics_Font g_sFontCm36
 
const Graphics_Font g_sFontCm36b
 
const Graphics_Font g_sFontCm36i
 
const Graphics_Font g_sFontCm38
 
const Graphics_Font g_sFontCm38b
 
const Graphics_Font g_sFontCm38i
 
const Graphics_Font g_sFontCm40
 
const Graphics_Font g_sFontCm40b
 
const Graphics_Font g_sFontCm40i
 
const Graphics_Font g_sFontCm42
 
const Graphics_Font g_sFontCm42b
 
const Graphics_Font g_sFontCm42i
 
const Graphics_Font g_sFontCm44
 
const Graphics_Font g_sFontCm44b
 
const Graphics_Font g_sFontCm44i
 
const Graphics_Font g_sFontCm46
 
const Graphics_Font g_sFontCm46b
 
const Graphics_Font g_sFontCm46i
 
const Graphics_Font g_sFontCm48
 
const Graphics_Font g_sFontCm48b
 
const Graphics_Font g_sFontCm48i
 
const Graphics_Font g_sFontCmsc12
 
const Graphics_Font g_sFontCmsc14
 
const Graphics_Font g_sFontCmsc16
 
const Graphics_Font g_sFontCmsc18
 
const Graphics_Font g_sFontCmsc20
 
const Graphics_Font g_sFontCmsc22
 
const Graphics_Font g_sFontCmsc24
 
const Graphics_Font g_sFontCmsc26
 
const Graphics_Font g_sFontCmsc28
 
const Graphics_Font g_sFontCmsc30
 
const Graphics_Font g_sFontCmsc32
 
const Graphics_Font g_sFontCmsc34
 
const Graphics_Font g_sFontCmsc36
 
const Graphics_Font g_sFontCmsc38
 
const Graphics_Font g_sFontCmsc40
 
const Graphics_Font g_sFontCmsc42
 
const Graphics_Font g_sFontCmsc44
 
const Graphics_Font g_sFontCmsc46
 
const Graphics_Font g_sFontCmsc48
 
const Graphics_Font g_sFontCmss12
 
const Graphics_Font g_sFontCmss12b
 
const Graphics_Font g_sFontCmss12i
 
const Graphics_Font g_sFontCmss14
 
const Graphics_Font g_sFontCmss14b
 
const Graphics_Font g_sFontCmss14i
 
const Graphics_Font g_sFontCmss16
 
const Graphics_Font g_sFontCmss16b
 
const Graphics_Font g_sFontCmss16i
 
const Graphics_Font g_sFontCmss18
 
const Graphics_Font g_sFontCmss18b
 
const Graphics_Font g_sFontCmss18i
 
const Graphics_Font g_sFontCmss20
 
const Graphics_Font g_sFontCmss20b
 
const Graphics_Font g_sFontCmss20i
 
const Graphics_Font g_sFontCmss22
 
const Graphics_Font g_sFontCmss22b
 
const Graphics_Font g_sFontCmss22i
 
const Graphics_Font g_sFontCmss24
 
const Graphics_Font g_sFontCmss24b
 
const Graphics_Font g_sFontCmss24i
 
const Graphics_Font g_sFontCmss26
 
const Graphics_Font g_sFontCmss26b
 
const Graphics_Font g_sFontCmss26i
 
const Graphics_Font g_sFontCmss28
 
const Graphics_Font g_sFontCmss28b
 
const Graphics_Font g_sFontCmss28i
 
const Graphics_Font g_sFontCmss30
 
const Graphics_Font g_sFontCmss30b
 
const Graphics_Font g_sFontCmss30i
 
const Graphics_Font g_sFontCmss32
 
const Graphics_Font g_sFontCmss32b
 
const Graphics_Font g_sFontCmss32i
 
const Graphics_Font g_sFontCmss34
 
const Graphics_Font g_sFontCmss34b
 
const Graphics_Font g_sFontCmss34i
 
const Graphics_Font g_sFontCmss36
 
const Graphics_Font g_sFontCmss36b
 
const Graphics_Font g_sFontCmss36i
 
const Graphics_Font g_sFontCmss38
 
const Graphics_Font g_sFontCmss38b
 
const Graphics_Font g_sFontCmss38i
 
const Graphics_Font g_sFontCmss40
 
const Graphics_Font g_sFontCmss40b
 
const Graphics_Font g_sFontCmss40i
 
const Graphics_Font g_sFontCmss42
 
const Graphics_Font g_sFontCmss42b
 
const Graphics_Font g_sFontCmss42i
 
const Graphics_Font g_sFontCmss44
 
const Graphics_Font g_sFontCmss44b
 
const Graphics_Font g_sFontCmss44i
 
const Graphics_Font g_sFontCmss46
 
const Graphics_Font g_sFontCmss46b
 
const Graphics_Font g_sFontCmss46i
 
const Graphics_Font g_sFontCmss48
 
const Graphics_Font g_sFontCmss48b
 
const Graphics_Font g_sFontCmss48i
 
const Graphics_Font g_sFontCmtt12
 
const Graphics_Font g_sFontCmtt14
 
const Graphics_Font g_sFontCmtt16
 
const Graphics_Font g_sFontCmtt18
 
const Graphics_Font g_sFontCmtt20
 
const Graphics_Font g_sFontCmtt22
 
const Graphics_Font g_sFontCmtt24
 
const Graphics_Font g_sFontCmtt26
 
const Graphics_Font g_sFontCmtt28
 
const Graphics_Font g_sFontCmtt30
 
const Graphics_Font g_sFontCmtt32
 
const Graphics_Font g_sFontCmtt34
 
const Graphics_Font g_sFontCmtt36
 
const Graphics_Font g_sFontCmtt38
 
const Graphics_Font g_sFontCmtt40
 
const Graphics_Font g_sFontCmtt42
 
const Graphics_Font g_sFontCmtt44
 
const Graphics_Font g_sFontCmtt46
 
const Graphics_Font g_sFontCmtt48
 
const Graphics_Font g_sFontFixed6x8
 

Macro Definition Documentation

#define NDEBUG

Copyright 2016, Texas Instruments Incorporated