SimpleLink Graphics Library  4.11.00.04
grlib.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015-2018, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 #include <stdint.h>
33 #include <stdbool.h>
34 
35 #ifndef __GRLIB_H__
36 #define __GRLIB_H__
37 
38 #include <assert.h>
39 
40 //*****************************************************************************
41 //
44 //
45 //*****************************************************************************
46 
47 //*****************************************************************************
48 //
49 // If building with a C++ compiler, make all of the definitions in this header
50 // have a C binding.
51 //
52 //*****************************************************************************
53 #ifdef __cplusplus
54 extern "C"
55 {
56 #endif
57 
58 //*****************************************************************************
59 //
60 // Make sure min and max are defined.
61 //
62 //*****************************************************************************
63 #ifndef min
64 #define min(a, b) (((a) < (b)) ? (a) : (b))
65 #endif
66 
67 #ifndef max
68 #define max(a, b) (((a) < (b)) ? (b) : (a))
69 #endif
70 
71 //*****************************************************************************
72 //
74 //
75 //*****************************************************************************
76 typedef struct Graphics_Image
77 {
78  uint8_t bPP;
79  uint16_t xSize;
80  uint16_t ySize;
81  uint16_t numColors;
82  const uint32_t * pPalette;
83  const uint8_t * pPixel;
85 
86 //*****************************************************************************
87 //
91 //
92 //*****************************************************************************
93 typedef struct Graphics_Rectangle
94 {
95  int16_t xMin;
96  int16_t yMin;
97  int16_t xMax;
98  int16_t yMax;
100 
102 
103 //*****************************************************************************
104 //
106 //
107 //*****************************************************************************
109 {
110  //
112  //
113  void (*const pfnPixelDraw) (const Graphics_Display * pDisplay, int16_t lX,
114  int16_t lY,
115  uint16_t ulValue);
116 
117  //
119  //
120  void (*const pfnPixelDrawMultiple) (const Graphics_Display * pDisplay, int16_t lX,
121  int16_t lY,
122  int16_t lX0, int16_t lCount,
123  int16_t lBPP,
124  const uint8_t * pucData,
125  const uint32_t * pucPalette);
126 
127  //
129  //
130  void (*const pfnLineDrawH) (const Graphics_Display * pDisplay, int16_t lX1,
131  int16_t lX2, int16_t lY,
132  uint16_t ulValue);
133 
134  //
136  //
137  void (*const pfnLineDrawV) (const Graphics_Display * pDisplay, int16_t lX,
138  int16_t lY1, int16_t lY2,
139  uint16_t ulValue);
140 
141  //
143  //
144  void (*const pfnRectFill) (const Graphics_Display * pDisplay,
145  const Graphics_Rectangle * pRect,
146  uint16_t ulValue);
147 
148  //
151  //
152  uint32_t (*const pfnColorTranslate) (const Graphics_Display * pDisplay,
153  uint32_t ulValue);
154 
155  //
158  //
159  void (*const pfnFlush) (const Graphics_Display * pDisplay);
160 
161  //
164  //
165  void (*const pfnClearDisplay) (const Graphics_Display * pDisplay,
166  uint16_t ulValue);
167 }
169 
170 //*****************************************************************************
171 //
173 //
174 //*****************************************************************************
176 {
177  int32_t size;
178  void *displayData;
179  uint16_t width;
180  uint16_t heigth;
182 };
183 
184 //*****************************************************************************
185 //
187 //
188 //*****************************************************************************
189 typedef struct Graphics_Font
190 {
191  uint8_t format;
192  uint8_t maxWidth;
193  uint8_t height;
194  uint8_t baseline;
195  uint16_t offset[96];
196  const uint8_t *data;
197 } Graphics_Font;
198 
199 //*****************************************************************************
200 //
209 //
210 //*****************************************************************************
211 typedef struct Graphics_FontEx
212 {
213  uint8_t format;
214  uint8_t maxWidth;
215  uint8_t height;
216  uint8_t baseline;
217  uint8_t first;
218  uint8_t last;
219  const uint16_t *offset;
220  const uint8_t *data;
222 
223 //*****************************************************************************
224 //
227 //
228 //*****************************************************************************
229 typedef struct Graphics_Context
230 {
231  int32_t size;
234  uint32_t foreground;
235  uint32_t background;
238 
239 //*****************************************************************************
240 //
241 // Deprecated struct names. These definitions ensure backwards compatibility
242 // but new code should avoid using deprecated struct names since these will
243 // be removed at some point in the future.
244 //
245 //*****************************************************************************
246 #define ClrAliceBlue GRAPHICS_COLOR_ALICE_BLUE
247 #define ClrAntiqueWhite GRAPHICS_COLOR_ANTIQUE_WHITE
248 #define ClrAqua GRAPHICS_COLOR_AQUA
249 #define ClrAquamarine GRAPHICS_COLOR_AQUAMARINE
250 #define ClrAzure GRAPHICS_COLOR_AZURE
251 #define ClrBeige GRAPHICS_COLOR_BEIGE
252 #define ClrBisque GRAPHICS_COLOR_BISQUE
253 #define ClrBlack GRAPHICS_COLOR_BLACK
254 #define ClrBlanchedAlmond GRAPHICS_COLOR_BLANCHED_ALMOND
255 #define ClrBlue GRAPHICS_COLOR_BLUE
256 #define ClrBlueViolet GRAPHICS_COLOR_BLUE_VIOLET
257 #define ClrBrown GRAPHICS_COLOR_BROWN
258 #define ClrBurlyWood GRAPHICS_COLOR_BURLY_WOOD
259 #define ClrCadetBlue GRAPHICS_COLOR_CADET_BLUE
260 #define ClrChartreuse GRAPHICS_COLOR_CHARTREUSE
261 #define ClrChocolate GRAPHICS_COLOR_CHOCOLATE
262 #define ClrCoral GRAPHICS_COLOR_CORAL
263 #define ClrCornflowerBlue GRAPHICS_COLOR_CORNFLOWER_BLUE
264 #define ClrCornsilk GRAPHICS_COLOR_CORNSILK
265 #define ClrCrimson GRAPHICS_COLOR_CRIMSON
266 #define ClrCyan GRAPHICS_COLOR_CYAN
267 #define ClrDarkBlue GRAPHICS_COLOR_DARK_BLUE
268 #define ClrDarkCyan GRAPHICS_COLOR_DARK_CYAN
269 #define ClrDarkGoldenrod GRAPHICS_COLOR_DARK_GOLDENROD
270 #define ClrDarkGray GRAPHICS_COLOR_DARK_GRAY
271 #define ClrDarkGreen GRAPHICS_COLOR_DARK_GREEN
272 #define ClrDarkKhaki GRAPHICS_COLOR_DARK_KHAKI
273 #define ClrDarkMagenta GRAPHICS_COLOR_DARK_MAGENTA
274 #define ClrDarkOliveGreen GRAPHICS_COLOR_DARK_OLIVE_GREEN
275 #define ClrDarkOrange GRAPHICS_COLOR_DARK_ORANGE
276 #define ClrDarkOrchid GRAPHICS_COLOR_DARK_ORCHID
277 #define ClrDarkRed GRAPHICS_COLOR_DARK_RED
278 #define ClrDarkSalmon GRAPHICS_COLOR_DARK_SALMON
279 #define ClrDarkSeaGreen GRAPHICS_COLOR_DARK_SEA_GREEN
280 #define ClrDarkSlateBlue GRAPHICS_COLOR_DARK_SLATE_BLUE
281 #define ClrDarkSlateGray GRAPHICS_COLOR_DARK_SLATE_GRAY
282 #define ClrDarkTurquoise GRAPHICS_COLOR_DARK_TURQUOISE
283 #define ClrDarkViolet GRAPHICS_COLOR_DARK_VIOLET
284 #define ClrDeepPink GRAPHICS_COLOR_DEEP_PINK
285 #define ClrDeepSkyBlue GRAPHICS_COLOR_DEEP_SKY_BLUE
286 #define ClrDimGray GRAPHICS_COLOR_DIM_GRAY
287 #define ClrDodgerBlue GRAPHICS_COLOR_DODGER_BLUE
288 #define ClrFireBrick GRAPHICS_COLOR_FIRE_BRICK
289 #define ClrFloralWhite GRAPHICS_COLOR_FLORAL_WHITE
290 #define ClrForestGreen GRAPHICS_COLOR_FOREST_GREEN
291 #define ClrFuchsia GRAPHICS_COLOR_FUCHSIA
292 #define ClrGainsboro GRAPHICS_COLOR_GAINSBORO
293 #define ClrGhostWhite GRAPHICS_COLOR_GHOST_WHITE
294 #define ClrGold GRAPHICS_COLOR_GOLD
295 #define ClrGoldenrod GRAPHICS_COLOR_GOLDENRON
296 #define ClrGray GRAPHICS_COLOR_GRAY
297 #define ClrGreen GRAPHICS_COLOR_GREEN
298 #define ClrGreenYellow GRAPHICS_COLOR_GREEN_YELLOW
299 #define ClrHoneydew GRAPHICS_COLOR_HONEYDEW
300 #define ClrHotPink GRAPHICS_COLOR_HOT_PINK
301 #define ClrIndianRed GRAPHICS_COLOR_INDIAN_RED
302 #define ClrIndigo GRAPHICS_COLOR_INDIGO
303 #define ClrIvory GRAPHICS_COLOR_IVORY
304 #define ClrKhaki GRAPHICS_COLOR_KHAKI
305 #define ClrLavender GRAPHICS_COLOR_LAVENDER
306 #define ClrLavenderBlush GRAPHICS_COLOR_LAVENDER_BLUSH
307 #define ClrLawnGreen GRAPHICS_COLOR_LAWN_GREEN
308 #define ClrLemonChiffon GRAPHICS_COLOR_LEMON_CHIFFON
309 #define ClrLightBlue GRAPHICS_COLOR_LIGHT_BLUE
310 #define ClrLightCoral GRAPHICS_COLOR_LIGHT_CORAL
311 #define ClrLightCyan GRAPHICS_COLOR_LIGHT_CYAN
312 #define ClrLightGoldenrodYellow GRAPHICS_COLOR_LIGHT_GOLDENRON_YELLOW
313 #define ClrLightGreen GRAPHICS_COLOR_LIGHT_GREEN
314 #define ClrLightGrey GRAPHICS_COLOR_LIGHT_GRAY
315 #define ClrLightPink GRAPHICS_COLOR_LIGHT_PINK
316 #define ClrLightSalmon GRAPHICS_COLOR_LIGHT_SALMON
317 #define ClrLightSeaGreen GRAPHICS_COLOR_LIGHT_SEA_GREEN
318 #define ClrLightSkyBlue GRAPHICS_COLOR_LIGHT_SKY_BLUE
319 #define ClrLightSlateGray GRAPHICS_COLOR_LIGHT_SLATE_GRAY
320 #define ClrLightSteelBlue GRAPHICS_COLOR_LIGHT_STEEL_BLUE
321 #define ClrLightYellow GRAPHICS_COLOR_LIGHT_YELLOW
322 #define ClrLime GRAPHICS_COLOR_LIME
323 #define ClrLimeGreen GRAPHICS_COLOR_LIME_GREEN
324 #define ClrLinen GRAPHICS_COLOR_LINEN
325 #define ClrMagenta GRAPHICS_COLOR_MAGENTA
326 #define ClrMaroon GRAPHICS_COLOR_MAROON
327 #define ClrMediumAquamarine GRAPHICS_COLOR_MEDIUM_AQUAMARINE
328 #define ClrMediumBlue GRAPHICS_COLOR_MEDIUM_BLUE
329 #define ClrMediumOrchid GRAPHICS_COLOR_MEDIUM_ORCHID
330 #define ClrMediumPurple GRAPHICS_COLOR_MEDIUM_PURPLE
331 #define ClrMediumSeaGreen GRAPHICS_COLOR_MEDIUM_SEA_GREEN
332 #define ClrMediumSlateBlue GRAPHICS_COLOR_MEDIUM_SLATE_BLUE
333 #define ClrMediumSpringGreen GRAPHICS_COLOR_MEDIUM_SPRING_GREEN
334 #define ClrMediumTurquoise GRAPHICS_COLOR_MEDIUM_TURQUOISE
335 #define ClrMediumVioletRed GRAPHICS_COLOR_MEDIUM_VIOLET_RED
336 #define ClrMidnightBlue GRAPHICS_COLOR_MIGNIGHT_BLUE
337 #define ClrMintCream GRAPHICS_COLOR_MINT_CREAM
338 #define ClrMistyRose GRAPHICS_COLOR_MISTY_ROSE
339 #define ClrMoccasin GRAPHICS_COLOR_MOCCASIN
340 #define ClrNavajoWhite GRAPHICS_COLOR_NAVAJO_WHITE
341 #define ClrNavy GRAPHICS_COLOR_NAVY
342 #define ClrOldLace GRAPHICS_COLOR_OLD_LACE
343 #define ClrOlive GRAPHICS_COLOR_OLIVE
344 #define ClrOliveDrab GRAPHICS_COLOR_OLIVE_DRAB
345 #define ClrOrange GRAPHICS_COLOR_ORANGE
346 #define ClrOrangeRed GRAPHICS_COLOR_ORANGE_RED
347 #define ClrOrchid GRAPHICS_COLOR_ORCHID
348 #define ClrPaleGoldenrod GRAPHICS_COLOR_PALE_GOLDENRON
349 #define ClrPaleGreen GRAPHICS_COLOR_PALE_GREEN
350 #define ClrPaleTurquoise GRAPHICS_COLOR_PALE_TURQUOISE
351 #define ClrPaleVioletRed GRAPHICS_COLOR_PALE_VIOLET_RED
352 #define ClrPapayaWhip GRAPHICS_COLOR_PAPAYA_WHIP
353 #define ClrPeachPuff GRAPHICS_COLOR_PEACH_PUFF
354 #define ClrPeru GRAPHICS_COLOR_PERU
355 #define ClrPink GRAPHICS_COLOR_PINK
356 #define ClrPlum GRAPHICS_COLOR_PLUM
357 #define ClrPowderBlue GRAPHICS_COLOR_POWDER_BLUE
358 #define ClrPurple GRAPHICS_COLOR_PURPLE
359 #define ClrRed GRAPHICS_COLOR_RED
360 #define ClrRosyBrown GRAPHICS_COLOR_ROSY_BROWN
361 #define ClrRoyalBlue GRAPHICS_COLOR_ROYAL_BLUE
362 #define ClrSaddleBrown GRAPHICS_COLOR_SADDLE_BROWN
363 #define ClrSalmon GRAPHICS_COLOR_SALMON
364 #define ClrSandyBrown GRAPHICS_COLOR_SANDY_BROWN
365 #define ClrSeaGreen GRAPHICS_COLOR_SEA_GREEN
366 #define ClrSeashell GRAPHICS_COLOR_SEASHELL
367 #define ClrSienna GRAPHICS_COLOR_SIENNA
368 #define ClrSilver GRAPHICS_COLOR_SILVER
369 #define ClrSkyBlue GRAPHICS_COLOR_SKY_BLUE
370 #define ClrSlateBlue GRAPHICS_COLOR_SLATE_BLUE
371 #define ClrSlateGray GRAPHICS_COLOR_SLATE_GRAY
372 #define ClrSnow GRAPHICS_COLOR_SNOW
373 #define ClrSpringGreen GRAPHICS_COLOR_SPRING_GREEN
374 #define ClrSteelBlue GRAPHICS_COLOR_STEEL_BLUE
375 #define ClrTan GRAPHICS_COLOR_TAN
376 #define ClrTeal GRAPHICS_COLOR_TEAL
377 #define ClrThistle GRAPHICS_COLOR_THISTLE
378 #define ClrTomato GRAPHICS_COLOR_TOMATO
379 #define ClrTurquoise GRAPHICS_COLOR_TURQUOISE
380 #define ClrViolet GRAPHICS_COLOR_VIOLET
381 #define ClrWheat GRAPHICS_COLOR_WHEAT
382 #define ClrWhite GRAPHICS_COLOR_WHITE
383 #define ClrWhiteSmoke GRAPHICS_COLOR_WHITE_SMOKE
384 #define ClrYellow GRAPHICS_COLOR_YELLOW
385 #define ClrYellowGreen GRAPHICS_COLOR_YELLOW_GREEN
386 #define ClrBlack GRAPHICS_COLOR_BLACK
387 #define FONT_FMT_UNCOMPRESSED GRAPHICS_FONT_FMT_UNCOMPRESSED
388 #define FONT_FMT_PIXEL_RLE GRAPHICS_FONT_FMT_PIXEL_RLE
389 #define FONT_EX_MARKER GRAPHICS_FONT_EX_MARKER
390 #define FONT_FMT_EX_UNCOMPRESSED GRAPHICS_FONT_FMT_EX_UNCOMPRESSED
391 #define FONT_FMT_EX_PIXEL_RLE GRAPHICS_FONT_FMT_EX_PIXEL_RLE
392 #define AUTO_STRING_LENGTH GRAPHICS_AUTO_STRING_LENGTH
393 #define OPAQUE_TEXT GRAPHICS_OPAQUE_TEXT
394 #define TRANSPARENT_TEXT GRAPHICS_TRANSPARENT_TEXT
395 #define IMAGE_FMT_1BPP_UNCOMP GRAPHICS_IMAGE_FMT_1BPP_UNCOMP
396 #define IMAGE_FMT_2BPP_UNCOMP GRAPHICS_IMAGE_FMT_2BPP_UNCOMP
397 #define IMAGE_FMT_4BPP_UNCOMP GRAPHICS_IMAGE_FMT_4BPP_UNCOMP
398 #define IMAGE_FMT_8BPP_UNCOMP GRAPHICS_IMAGE_FMT_8BPP_UNCOMP
399 #define IMAGE_FMT_1BPP_COMP_RLE4 GRAPHICS_IMAGE_FMT_1BPP_COMP_RLE4
400 #define IMAGE_FMT_2BPP_UNCOMP GRAPHICS_IMAGE_FMT_2BPP_UNCOMP
401 #define IMAGE_FMT_4BPP_COMP_RLE4 GRAPHICS_IMAGE_FMT_4BPP_COMP_RLE4
402 #define IMAGE_FMT_1BPP_COMP_RLE7 GRAPHICS_IMAGE_FMT_1BPP_COMP_RLE7
403 #define IMAGE_FMT_1BPP_COMP_RLE8 GRAPHICS_IMAGE_FMT_1BPP_COMP_RLE8
404 #define IMAGE_FMT_2BPP_COMP_RLE8 GRAPHICS_IMAGE_FMT_2BPP_COMP_RLE8
405 #define IMAGE_FMT_4BPP_COMP_RLE8 GRAPHICS_IMAGE_FMT_4BPP_COMP_RLE8
406 #define IMAGE_FMT_8BPP_COMP_RLE8 GRAPHICS_IMAGE_FMT_8BPP_COMP_RLE8
407 #define IMAGE_FMT_8BPP_COMP_RLEBLEND GRAPHICS_IMAGE_FMT_8BPP_COMP_RLEBLEND
408 #define tFontEx Graphics_FontEx
409 #define tFont Graphics_Font
410 #define tDisplay Graphics_Display
411 #define tRectangle Graphics_Rectangle
412 #define tImage Graphics_Image
413 #define tContext Graphics_Context
414 #define sXMax xMax
415 #define sXMin xMin
416 #define sYMax yMax
417 #define sYMin yMin
418 
419 //*****************************************************************************
420 //
421 // Deprecated function names. These definitions ensure backwards compatibility
422 // but new code should avoid using deprecated function names since these will
423 // be removed at some point in the future.
424 //
425 //*****************************************************************************
426 #define GrCircleDraw Graphics_drawCircle
427 #define GrCircleFill Graphics_fillCircle
428 #define GrContextClipRegionSet Graphics_setClipRegion
429 #define GrContextInit Graphics_initContext
430 #define GrImageDraw Graphics_drawImage
431 #define GrLineDraw Graphics_drawLine
432 #define GrLineDrawH Graphics_drawLineH
433 #define GrLineDrawV Graphics_drawLineV
434 #define GrRectDraw Graphics_drawRectangle
435 #define GrRectFill Graphics_fillRectangle
436 #define GrStringDraw Graphics_drawString
437 #define GrStringWidthGet Graphics_getStringWidth
438 #define GrRectOverlapCheck Graphics_isOverlappingRectangle
439 #define GrRectIntersectGet Graphics_getRectangleIntersection
440 #define GrContextBackgroundSet Graphics_setBackgroundColor
441 #define GrContextBackgroundSetTranslated \
442  Graphics_setBackgroundColorTranslated
443 #define GrContextDpyWidthGet Graphics_getDisplayWidth
444 #define GrContextDpyHeightGet Graphics_getDisplayHeight
445 #define GrContextFontSet Graphics_setFont
446 #define GrContextForegroundSet Graphics_setForegroundColor
447 #define GrContextForegroundSetTranslated \
448  Graphics_setForegroundColorTranslated
449 #define GrFlush Graphics_flushBuffer
450 #define GrClearDisplay Graphics_clearDisplay
451 #define GrFontBaselineGet Graphics_getFontBaseline
452 #define GrFontHeightGet Graphics_getFontHeight
453 #define GrFontMaxWidthGet Graphics_getFontMaxWidth
454 #define GrImageColorsGet Graphics_getImageColors
455 #define GrImageHeightGet Graphics_getImageHeight
456 #define GrImageWidthGet Graphics_getImageWidth
457 #define GrOffScreen1BPPSize \
458  Graphics_getOffscreen1BppImageSize
459 #define GrOffScreen4BPPSize \
460  Graphics_getOffscreen4BppImageSize
461 #define GrOffScreen8BPPSize \
462  Graphics_getOffscreen8BppImageSize
463 #define GrPixelDraw Graphics_drawPixel
464 #define GrStringBaselineGet Graphics_getStringBaseline
465 #define GrStringDrawCentered Graphics_drawStringCentered
466 #define GrStringHeightGet Graphics_getStringHeight
467 #define GrStringMaxWidthGet Graphics_getStringMaxWidth
468 #define DpyColorTranslate Graphics_translateColorOnDisplay
469 #define DpyFlush Graphics_flushOnDisplay
470 #define DpyClearDisplay Graphics_clearDisplayOnDisplay
471 #define DpyHeightGet Graphics_getHeightOfDisplay
472 #define DpyLineDrawH \
473  Graphics_drawHorizontalLineOnDisplay
474 #define DpyLineDrawV Graphics_drawVerticalLineOnDisplay
475 #define DpyPixelDraw Graphics_drawPixelOnDisplay
476 #define DpyPixelDrawMultiple \
477  Graphics_drawMultiplePixelsOnDisplay
478 #define DpyRectFill Graphics_fillRectangleOnDisplay
479 #define DpyWidthGet Graphics_getWidthOfDisplay
480 #define GrRectContainsPoint Graphics_isPointWithinRectangle
481 
482 //*****************************************************************************
483 //
485 //
486 //*****************************************************************************
487 #define GRAPHICS_FONT_FMT_UNCOMPRESSED 0x00
488 
489 //*****************************************************************************
490 //
492 //
493 //*****************************************************************************
494 #define GRAPHICS_FONT_FMT_PIXEL_RLE 0x01
495 
496 //*****************************************************************************
497 //
500 //
501 //*****************************************************************************
502 #define GRAPHICS_FONT_EX_MARKER 0x80
503 
504 //*****************************************************************************
505 //
508 //
509 //*****************************************************************************
510 #define GRAPHICS_FONT_FMT_EX_UNCOMPRESSED (FONT_FMT_UNCOMPRESSED | \
511  FONT_EX_MARKER)
512 
513 //*****************************************************************************
514 //
517 //
518 //*****************************************************************************
519 #define GRAPHICS_FONT_FMT_EX_PIXEL_RLE (FONT_FMT_PIXEL_RLE | \
520  FONT_EX_MARKER)
521 
522 //*****************************************************************************
523 //
526 //
527 //*****************************************************************************
528 #define GRAPHICS_AUTO_STRING_LENGTH -1
529 
530 //*****************************************************************************
531 //
534 //
535 //*****************************************************************************
536 #define GRAPHICS_OPAQUE_TEXT 1
537 
538 //*****************************************************************************
539 //
542 //
543 //*****************************************************************************
544 #define GRAPHICS_TRANSPARENT_TEXT 0
545 
546 //*****************************************************************************
547 //
550 //
551 //*****************************************************************************
552 #define GRAPHICS_IMAGE_FMT_1BPP_UNCOMP 0x01
553 
554 //*****************************************************************************
555 //
558 //
559 //*****************************************************************************
560 #define GRAPHICS_IMAGE_FMT_2BPP_UNCOMP 0x02
561 
562 //*****************************************************************************
563 //
566 //
567 //*****************************************************************************
568 #define GRAPHICS_IMAGE_FMT_4BPP_UNCOMP 0x04
569 
570 //*****************************************************************************
571 //
574 //
575 //*****************************************************************************
576 #define GRAPHICS_IMAGE_FMT_8BPP_UNCOMP 0x08
577 
578 //*****************************************************************************
579 //
582 //
583 //*****************************************************************************
584 #define GRAPHICS_IMAGE_FMT_1BPP_COMP_RLE4 0x41
585 
586 //*****************************************************************************
587 //
590 //
591 //*****************************************************************************
592 #define GRAPHICS_IMAGE_FMT_2BPP_COMP_RLE4 0x42
593 
594 //*****************************************************************************
595 //
598 //
599 //*****************************************************************************
600 #define GRAPHICS_IMAGE_FMT_4BPP_COMP_RLE4 0x44
601 
602 //*****************************************************************************
603 //
606 //
607 //*****************************************************************************
608 #define GRAPHICS_IMAGE_FMT_1BPP_COMP_RLE7 0x71
609 
610 //*****************************************************************************
611 //
614 //
615 //*****************************************************************************
616 #define GRAPHICS_IMAGE_FMT_1BPP_COMP_RLE8 0x81
617 
618 //*****************************************************************************
619 //
622 //
623 //*****************************************************************************
624 #define GRAPHICS_IMAGE_FMT_2BPP_COMP_RLE8 0x82
625 
626 //*****************************************************************************
627 //
630 //
631 //*****************************************************************************
632 #define GRAPHICS_IMAGE_FMT_4BPP_COMP_RLE8 0x84
633 
634 //*****************************************************************************
635 //
638 //
639 //*****************************************************************************
640 #define GRAPHICS_IMAGE_FMT_8BPP_COMP_RLE8 0x88
641 
642 //*****************************************************************************
643 //
646 //
647 //*****************************************************************************
648 #define GRAPHICS_IMAGE_FMT_8BPP_COMP_RLEBLEND 0x28
649 
650 //*****************************************************************************
651 //
652 // A set of color definitions. This set is the subset of the X11 colors (from
653 // rgb.txt) that are supported by typical web browsers.
654 //
655 //*****************************************************************************
656 #define GRAPHICS_COLOR_ALICE_BLUE 0x00F0F8FF
657 #define GRAPHICS_COLOR_ANTIQUE_WHITE 0x00FAEBD7
658 #define GRAPHICS_COLOR_AQUA 0x0000FFFF
659 #define GRAPHICS_COLOR_AQUAMARINE 0x007FFFD4
660 #define GRAPHICS_COLOR_AZURE 0x00F0FFFF
661 #define GRAPHICS_COLOR_BEIGE 0x00F5F5DC
662 #define GRAPHICS_COLOR_BISQUE 0x00FFE4C4
663 #define GRAPHICS_COLOR_BLACK 0x00000000
664 #define GRAPHICS_COLOR_BLANCHED_ALMOND 0x00FFEBCD
665 #define GRAPHICS_COLOR_BLUE 0x000000FF
666 #define GRAPHICS_COLOR_BLUE_VIOLET 0x008A2BE2
667 #define GRAPHICS_COLOR_BROWN 0x00A52A2A
668 #define GRAPHICS_COLOR_BURLY_WOOD 0x00DEB887
669 #define GRAPHICS_COLOR_CADET_BLUE 0x005F9EA0
670 #define GRAPHICS_COLOR_CHARTREUSE 0x007FFF00
671 #define GRAPHICS_COLOR_CHOCOLATE 0x00D2691E
672 #define GRAPHICS_COLOR_CORAL 0x00FF7F50
673 #define GRAPHICS_COLOR_CORNFLOWER_BLUE 0x006495ED
674 #define GRAPHICS_COLOR_CORNSILK 0x00FFF8DC
675 #define GRAPHICS_COLOR_CRIMSON 0x00DC143C
676 #define GRAPHICS_COLOR_CYAN 0x0000FFFF
677 #define GRAPHICS_COLOR_DARK_BLUE 0x0000008B
678 #define GRAPHICS_COLOR_DARK_CYAN 0x00008B8B
679 #define GRAPHICS_COLOR_DARK_GOLDENROD 0x00B8860B
680 #define GRAPHICS_COLOR_DARK_GRAY 0x00A9A9A9
681 #define GRAPHICS_COLOR_DARK_GREEN 0x00006400
682 #define GRAPHICS_COLOR_DARK_KHAKI 0x00BDB76B
683 #define GRAPHICS_COLOR_DARK_MAGENTA 0x008B008B
684 #define GRAPHICS_COLOR_DARK_OLIVE_GREEN 0x00556B2F
685 #define GRAPHICS_COLOR_DARK_ORANGE 0x00FF8C00
686 #define GRAPHICS_COLOR_DARK_ORCHID 0x009932CC
687 #define GRAPHICS_COLOR_DARK_RED 0x008B0000
688 #define GRAPHICS_COLOR_DARK_SALMON 0x00E9967A
689 #define GRAPHICS_COLOR_DARK_SEA_GREEN 0x008FBC8F
690 #define GRAPHICS_COLOR_DARK_SLATE_BLUE 0x00483D8B
691 #define GRAPHICS_COLOR_DARK_SLATE_GRAY 0x002F4F4F
692 #define GRAPHICS_COLOR_DARK_TURQUOISE 0x0000CED1
693 #define GRAPHICS_COLOR_DARK_VIOLET 0x009400D3
694 #define GRAPHICS_COLOR_DEEP_PINK 0x00FF1493
695 #define GRAPHICS_COLOR_DEEP_SKY_BLUE 0x0000BFFF
696 #define GRAPHICS_COLOR_DIM_GRAY 0x00696969
697 #define GRAPHICS_COLOR_DODGER_BLUE 0x001E90FF
698 #define GRAPHICS_COLOR_FIRE_BRICK 0x00B22222
699 #define GRAPHICS_COLOR_FLORAL_WHITE 0x00FFFAF0
700 #define GRAPHICS_COLOR_FOREST_GREEN 0x00228B22
701 #define GRAPHICS_COLOR_FUCHSIA 0x00FF00FF
702 #define GRAPHICS_COLOR_GAINSBORO 0x00DCDCDC
703 #define GRAPHICS_COLOR_GHOST_WHITE 0x00F8F8FF
704 #define GRAPHICS_COLOR_GOLD 0x00FFD700
705 #define GRAPHICS_COLOR_GOLDENRON 0x00DAA520
706 #define GRAPHICS_COLOR_GRAY 0x00808080
707 #define GRAPHICS_COLOR_GREEN 0x00008000
708 #define GRAPHICS_COLOR_GREEN_YELLOW 0x00ADFF2F
709 #define GRAPHICS_COLOR_HONEYDEW 0x00F0FFF0
710 #define GRAPHICS_COLOR_HOT_PINK 0x00FF69B4
711 #define GRAPHICS_COLOR_INDIAN_RED 0x00CD5C5C
712 #define GRAPHICS_COLOR_INDIGO 0x004B0082
713 #define GRAPHICS_COLOR_IVORY 0x00FFFFF0
714 #define GRAPHICS_COLOR_KHAKI 0x00F0E68C
715 #define GRAPHICS_COLOR_LAVENDER 0x00E6E6FA
716 #define GRAPHICS_COLOR_LAVENDER_BLUSH 0x00FFF0F5
717 #define GRAPHICS_COLOR_LAWN_GREEN 0x007CFC00
718 #define GRAPHICS_COLOR_LEMON_CHIFFON 0x00FFFACD
719 #define GRAPHICS_COLOR_LIGHT_BLUE 0x00ADD8E6
720 #define GRAPHICS_COLOR_LIGHT_CORAL 0x00F08080
721 #define GRAPHICS_COLOR_LIGHT_CYAN 0x00E0FFFF
722 #define GRAPHICS_COLOR_LIGHT_GOLDENRON_YELLOW 0x00FAFAD2
723 #define GRAPHICS_COLOR_LIGHT_GREEN 0x0090EE90
724 #define GRAPHICS_COLOR_LIGHT_GRAY 0x00D3D3D3
725 #define GRAPHICS_COLOR_LIGHT_PINK 0x00FFB6C1
726 #define GRAPHICS_COLOR_LIGHT_SALMON 0x00FFA07A
727 #define GRAPHICS_COLOR_LIGHT_SEA_GREEN 0x0020B2AA
728 #define GRAPHICS_COLOR_LIGHT_SKY_BLUE 0x0087CEFA
729 #define GRAPHICS_COLOR_LIGHT_SLATE_GRAY 0x00778899
730 #define GRAPHICS_COLOR_LIGHT_STEEL_BLUE 0x00B0C4DE
731 #define GRAPHICS_COLOR_LIGHT_YELLOW 0x00FFFFE0
732 #define GRAPHICS_COLOR_LIME 0x0000FF00
733 #define GRAPHICS_COLOR_LIME_GREEN 0x0032CD32
734 #define GRAPHICS_COLOR_LINEN 0x00FAF0E6
735 #define GRAPHICS_COLOR_MAGENTA 0x00FF00FF
736 #define GRAPHICS_COLOR_MAROON 0x00800000
737 #define GRAPHICS_COLOR_MEDIUM_AQUAMARINE 0x0066CDAA
738 #define GRAPHICS_COLOR_MEDIUM_BLUE 0x000000CD
739 #define GRAPHICS_COLOR_MEDIUM_ORCHID 0x00BA55D3
740 #define GRAPHICS_COLOR_MEDIUM_PURPLE 0x009370DB
741 #define GRAPHICS_COLOR_MEDIUM_SEA_GREEN 0x003CB371
742 #define GRAPHICS_COLOR_MEDIUM_SLATE_BLUE 0x007B68EE
743 #define GRAPHICS_COLOR_MEDIUM_SPRING_GREEN 0x0000FA9A
744 #define GRAPHICS_COLOR_MEDIUM_TURQUOISE 0x0048D1CC
745 #define GRAPHICS_COLOR_MEDIUM_VIOLET_RED 0x00C71585
746 #define GRAPHICS_COLOR_MIGNIGHT_BLUE 0x00191970
747 #define GRAPHICS_COLOR_MINT_CREAM 0x00F5FFFA
748 #define GRAPHICS_COLOR_MISTY_ROSE 0x00FFE4E1
749 #define GRAPHICS_COLOR_MOCCASIN 0x00FFE4B5
750 #define GRAPHICS_COLOR_NAVAJO_WHITE 0x00FFDEAD
751 #define GRAPHICS_COLOR_NAVY 0x00000080
752 #define GRAPHICS_COLOR_OLD_LACE 0x00FDF5E6
753 #define GRAPHICS_COLOR_OLIVE 0x00808000
754 #define GRAPHICS_COLOR_OLIVE_DRAB 0x006B8E23
755 #define GRAPHICS_COLOR_ORANGE 0x00FFA500
756 #define GRAPHICS_COLOR_ORANGE_RED 0x00FF4500
757 #define GRAPHICS_COLOR_ORCHID 0x00DA70D6
758 #define GRAPHICS_COLOR_PALE_GOLDENRON 0x00EEE8AA
759 #define GRAPHICS_COLOR_PALE_GREEN 0x0098FB98
760 #define GRAPHICS_COLOR_PALE_TURQUOISE 0x00AFEEEE
761 #define GRAPHICS_COLOR_PALE_VIOLET_RED 0x00DB7093
762 #define GRAPHICS_COLOR_PAPAYA_WHIP 0x00FFEFD5
763 #define GRAPHICS_COLOR_PEACH_PUFF 0x00FFDAB9
764 #define GRAPHICS_COLOR_PERU 0x00CD853F
765 #define GRAPHICS_COLOR_PINK 0x00FFC0CB
766 #define GRAPHICS_COLOR_PLUM 0x00DDA0DD
767 #define GRAPHICS_COLOR_POWDER_BLUE 0x00B0E0E6
768 #define GRAPHICS_COLOR_PURPLE 0x00800080
769 #define GRAPHICS_COLOR_RED 0x00FF0000
770 #define GRAPHICS_COLOR_ROSY_BROWN 0x00BC8F8F
771 #define GRAPHICS_COLOR_ROYAL_BLUE 0x004169E1
772 #define GRAPHICS_COLOR_SADDLE_BROWN 0x008B4513
773 #define GRAPHICS_COLOR_SALMON 0x00FA8072
774 #define GRAPHICS_COLOR_SANDY_BROWN 0x00F4A460
775 #define GRAPHICS_COLOR_SEA_GREEN 0x002E8B57
776 #define GRAPHICS_COLOR_SEASHELL 0x00FFF5EE
777 #define GRAPHICS_COLOR_SIENNA 0x00A0522D
778 #define GRAPHICS_COLOR_SILVER 0x00C0C0C0
779 #define GRAPHICS_COLOR_SKY_BLUE 0x0087CEEB
780 #define GRAPHICS_COLOR_SLATE_BLUE 0x006A5ACD
781 #define GRAPHICS_COLOR_SLATE_GRAY 0x00708090
782 #define GRAPHICS_COLOR_SNOW 0x00FFFAFA
783 #define GRAPHICS_COLOR_SPRING_GREEN 0x0000FF7F
784 #define GRAPHICS_COLOR_STEEL_BLUE 0x004682B4
785 #define GRAPHICS_COLOR_TAN 0x00D2B48C
786 #define GRAPHICS_COLOR_TEAL 0x00008080
787 #define GRAPHICS_COLOR_THISTLE 0x00D8BFD8
788 #define GRAPHICS_COLOR_TOMATO 0x00FF6347
789 #define GRAPHICS_COLOR_TURQUOISE 0x0040E0D0
790 #define GRAPHICS_COLOR_VIOLET 0x00EE82EE
791 #define GRAPHICS_COLOR_WHEAT 0x00F5DEB3
792 #define GRAPHICS_COLOR_WHITE 0x00FFFFFF
793 #define GRAPHICS_COLOR_WHITE_SMOKE 0x00F5F5F5
794 #define GRAPHICS_COLOR_YELLOW 0x00FFFF00
795 #define GRAPHICS_COLOR_YELLOW_GREEN 0x009ACD32
796 #define GRAPHICS_COLOR_BLACK 0x00000000
797 
798 //*****************************************************************************
799 //
800 // Masks and shifts to aid in color format translation by drivers.
801 //
802 //*****************************************************************************
803 #define ClrRedMask 0x00FF0000
804 #define ClrRedShift 16
805 #define ClrGreenMask 0x0000FF00
806 #define ClrGreenShift 8
807 #define ClrBlueMask 0x000000FF
808 #define ClrBlueShift 0
809 
810 //*****************************************************************************
811 //
812 // Prototypes for the predefined fonts in the graphics library. ..Cm.. is the
813 // computer modern font, which is a serif font. ..Cmsc.. is the computer
814 // modern small-caps font, which is also a serif font. ..Cmss.. is the
815 // computer modern sans-serif font.
816 //
817 //*****************************************************************************
818 extern const Graphics_Font g_sFontCm12;
819 extern const Graphics_Font g_sFontCm12b;
820 extern const Graphics_Font g_sFontCm12i;
821 extern const Graphics_Font g_sFontCm14;
822 extern const Graphics_Font g_sFontCm14b;
823 extern const Graphics_Font g_sFontCm14i;
824 extern const Graphics_Font g_sFontCm16;
825 extern const Graphics_Font g_sFontCm16b;
826 extern const Graphics_Font g_sFontCm16i;
827 extern const Graphics_Font g_sFontCm18;
828 extern const Graphics_Font g_sFontCm18b;
829 extern const Graphics_Font g_sFontCm18i;
830 extern const Graphics_Font g_sFontCm20;
831 extern const Graphics_Font g_sFontCm20b;
832 extern const Graphics_Font g_sFontCm20i;
833 extern const Graphics_Font g_sFontCm22;
834 extern const Graphics_Font g_sFontCm22b;
835 extern const Graphics_Font g_sFontCm22i;
836 extern const Graphics_Font g_sFontCm24;
837 extern const Graphics_Font g_sFontCm24b;
838 extern const Graphics_Font g_sFontCm24i;
839 extern const Graphics_Font g_sFontCm26;
840 extern const Graphics_Font g_sFontCm26b;
841 extern const Graphics_Font g_sFontCm26i;
842 extern const Graphics_Font g_sFontCm28;
843 extern const Graphics_Font g_sFontCm28b;
844 extern const Graphics_Font g_sFontCm28i;
845 extern const Graphics_Font g_sFontCm30;
846 extern const Graphics_Font g_sFontCm30b;
847 extern const Graphics_Font g_sFontCm30i;
848 extern const Graphics_Font g_sFontCm32;
849 extern const Graphics_Font g_sFontCm32b;
850 extern const Graphics_Font g_sFontCm32i;
851 extern const Graphics_Font g_sFontCm34;
852 extern const Graphics_Font g_sFontCm34b;
853 extern const Graphics_Font g_sFontCm34i;
854 extern const Graphics_Font g_sFontCm36;
855 extern const Graphics_Font g_sFontCm36b;
856 extern const Graphics_Font g_sFontCm36i;
857 extern const Graphics_Font g_sFontCm38;
858 extern const Graphics_Font g_sFontCm38b;
859 extern const Graphics_Font g_sFontCm38i;
860 extern const Graphics_Font g_sFontCm40;
861 extern const Graphics_Font g_sFontCm40b;
862 extern const Graphics_Font g_sFontCm40i;
863 extern const Graphics_Font g_sFontCm42;
864 extern const Graphics_Font g_sFontCm42b;
865 extern const Graphics_Font g_sFontCm42i;
866 extern const Graphics_Font g_sFontCm44;
867 extern const Graphics_Font g_sFontCm44b;
868 extern const Graphics_Font g_sFontCm44i;
869 extern const Graphics_Font g_sFontCm46;
870 extern const Graphics_Font g_sFontCm46b;
871 extern const Graphics_Font g_sFontCm46i;
872 extern const Graphics_Font g_sFontCm48;
873 extern const Graphics_Font g_sFontCm48b;
874 extern const Graphics_Font g_sFontCm48i;
875 extern const Graphics_Font g_sFontCmsc12;
876 extern const Graphics_Font g_sFontCmsc14;
877 extern const Graphics_Font g_sFontCmsc16;
878 extern const Graphics_Font g_sFontCmsc18;
879 extern const Graphics_Font g_sFontCmsc20;
880 extern const Graphics_Font g_sFontCmsc22;
881 extern const Graphics_Font g_sFontCmsc24;
882 extern const Graphics_Font g_sFontCmsc26;
883 extern const Graphics_Font g_sFontCmsc28;
884 extern const Graphics_Font g_sFontCmsc30;
885 extern const Graphics_Font g_sFontCmsc32;
886 extern const Graphics_Font g_sFontCmsc34;
887 extern const Graphics_Font g_sFontCmsc36;
888 extern const Graphics_Font g_sFontCmsc38;
889 extern const Graphics_Font g_sFontCmsc40;
890 extern const Graphics_Font g_sFontCmsc42;
891 extern const Graphics_Font g_sFontCmsc44;
892 extern const Graphics_Font g_sFontCmsc46;
893 extern const Graphics_Font g_sFontCmsc48;
894 extern const Graphics_Font g_sFontCmss12;
895 extern const Graphics_Font g_sFontCmss12b;
896 extern const Graphics_Font g_sFontCmss12i;
897 extern const Graphics_Font g_sFontCmss14;
898 extern const Graphics_Font g_sFontCmss14b;
899 extern const Graphics_Font g_sFontCmss14i;
900 extern const Graphics_Font g_sFontCmss16;
901 extern const Graphics_Font g_sFontCmss16b;
902 extern const Graphics_Font g_sFontCmss16i;
903 extern const Graphics_Font g_sFontCmss18;
904 extern const Graphics_Font g_sFontCmss18b;
905 extern const Graphics_Font g_sFontCmss18i;
906 extern const Graphics_Font g_sFontCmss20;
907 extern const Graphics_Font g_sFontCmss20b;
908 extern const Graphics_Font g_sFontCmss20i;
909 extern const Graphics_Font g_sFontCmss22;
910 extern const Graphics_Font g_sFontCmss22b;
911 extern const Graphics_Font g_sFontCmss22i;
912 extern const Graphics_Font g_sFontCmss24;
913 extern const Graphics_Font g_sFontCmss24b;
914 extern const Graphics_Font g_sFontCmss24i;
915 extern const Graphics_Font g_sFontCmss26;
916 extern const Graphics_Font g_sFontCmss26b;
917 extern const Graphics_Font g_sFontCmss26i;
918 extern const Graphics_Font g_sFontCmss28;
919 extern const Graphics_Font g_sFontCmss28b;
920 extern const Graphics_Font g_sFontCmss28i;
921 extern const Graphics_Font g_sFontCmss30;
922 extern const Graphics_Font g_sFontCmss30b;
923 extern const Graphics_Font g_sFontCmss30i;
924 extern const Graphics_Font g_sFontCmss32;
925 extern const Graphics_Font g_sFontCmss32b;
926 extern const Graphics_Font g_sFontCmss32i;
927 extern const Graphics_Font g_sFontCmss34;
928 extern const Graphics_Font g_sFontCmss34b;
929 extern const Graphics_Font g_sFontCmss34i;
930 extern const Graphics_Font g_sFontCmss36;
931 extern const Graphics_Font g_sFontCmss36b;
932 extern const Graphics_Font g_sFontCmss36i;
933 extern const Graphics_Font g_sFontCmss38;
934 extern const Graphics_Font g_sFontCmss38b;
935 extern const Graphics_Font g_sFontCmss38i;
936 extern const Graphics_Font g_sFontCmss40;
937 extern const Graphics_Font g_sFontCmss40b;
938 extern const Graphics_Font g_sFontCmss40i;
939 extern const Graphics_Font g_sFontCmss42;
940 extern const Graphics_Font g_sFontCmss42b;
941 extern const Graphics_Font g_sFontCmss42i;
942 extern const Graphics_Font g_sFontCmss44;
943 extern const Graphics_Font g_sFontCmss44b;
944 extern const Graphics_Font g_sFontCmss44i;
945 extern const Graphics_Font g_sFontCmss46;
946 extern const Graphics_Font g_sFontCmss46b;
947 extern const Graphics_Font g_sFontCmss46i;
948 extern const Graphics_Font g_sFontCmss48;
949 extern const Graphics_Font g_sFontCmss48b;
950 extern const Graphics_Font g_sFontCmss48i;
951 extern const Graphics_Font g_sFontCmtt12;
952 extern const Graphics_Font g_sFontCmtt14;
953 extern const Graphics_Font g_sFontCmtt16;
954 extern const Graphics_Font g_sFontCmtt18;
955 extern const Graphics_Font g_sFontCmtt20;
956 extern const Graphics_Font g_sFontCmtt22;
957 extern const Graphics_Font g_sFontCmtt24;
958 extern const Graphics_Font g_sFontCmtt26;
959 extern const Graphics_Font g_sFontCmtt28;
960 extern const Graphics_Font g_sFontCmtt30;
961 extern const Graphics_Font g_sFontCmtt32;
962 extern const Graphics_Font g_sFontCmtt34;
963 extern const Graphics_Font g_sFontCmtt36;
964 extern const Graphics_Font g_sFontCmtt38;
965 extern const Graphics_Font g_sFontCmtt40;
966 extern const Graphics_Font g_sFontCmtt42;
967 extern const Graphics_Font g_sFontCmtt44;
968 extern const Graphics_Font g_sFontCmtt46;
969 extern const Graphics_Font g_sFontCmtt48;
970 extern const Graphics_Font g_sFontFixed6x8;
971 
972 //*****************************************************************************
973 //
974 // Language identifiers supported by the string table processing functions.
975 //
976 //*****************************************************************************
977 #define GrLangZhPRC 0x0804 // Chinese (PRC)
978 #define GrLangZhTW 0x0404 // Chinese (Taiwan)
979 #define GrLangEnUS 0x0409 // English (United States)
980 #define GrLangEnUK 0x0809 // English (United Kingdom)
981 #define GrLangEnAUS 0x0C09 // English (Australia)
982 #define GrLangEnCA 0x1009 // English (Canada)
983 #define GrLangEnNZ 0x1409 // English (New Zealand)
984 #define GrLangFr 0x040C // French (Standard)
985 #define GrLangDe 0x0407 // German (Standard)
986 #define GrLangHi 0x0439 // Hindi
987 #define GrLangIt 0x0410 // Italian (Standard)
988 #define GrLangJp 0x0411 // Japanese
989 #define GrLangKo 0x0412 // Korean
990 #define GrLangEsMX 0x080A // Spanish (Mexico)
991 #define GrLangEsSP 0x0C0A // Spanish (Spain)
992 #define GrLangSwKE 0x0441 // Swahili (Kenya)
993 #define GrLangUrIN 0x0820 // Urdu (India)
994 #define GrLangUrPK 0x0420 // Urdu (Pakistan)
995 
996 //*****************************************************************************
997 //
998 // Prototypes for the graphics library functions.
999 //
1000 //*****************************************************************************
1001 
1002 //*****************************************************************************
1003 //
1016 //
1017 //*****************************************************************************
1018 extern void Graphics_drawCircle(const Graphics_Context *context,
1019  int32_t x,
1020  int32_t y,
1021  int32_t lRadius);
1022 extern void Graphics_fillCircle(const Graphics_Context *context,
1023  int32_t x,
1024  int32_t y,
1025  int32_t lRadius);
1026 extern void Graphics_setClipRegion(Graphics_Context *context,
1027  Graphics_Rectangle *rect);
1028 extern void Graphics_initContext(Graphics_Context *context,
1029  Graphics_Display *display,
1030  const Graphics_Display_Functions *pFxns);
1031 extern void Graphics_drawImage(const Graphics_Context *context,
1032  const Graphics_Image *pBitmap,
1033  int16_t x,
1034  int16_t y);
1035 extern void Graphics_drawLine(const Graphics_Context *context,
1036  int32_t x1,
1037  int32_t y1,
1038  int32_t x2,
1039  int32_t y2);
1040 extern void Graphics_drawLineH(const Graphics_Context *context,
1041  int32_t x1,
1042  int32_t x2,
1043  int32_t y);
1044 extern void Graphics_drawLineV(const Graphics_Context *context,
1045  int32_t x,
1046  int32_t y1,
1047  int32_t y2);
1048 extern void Graphics_drawRectangle(const Graphics_Context *context,
1049  const Graphics_Rectangle *rect);
1050 extern void Graphics_fillRectangle(const Graphics_Context *context,
1051  const Graphics_Rectangle *rect);
1052 extern void Graphics_drawString(const Graphics_Context *context,
1053  int8_t *string,
1054  int32_t lLength,
1055  int32_t x,
1056  int32_t y,
1057  bool opaque);
1058 extern int32_t Graphics_getStringWidth(const Graphics_Context *context,
1059  const int8_t *string,
1060  int32_t lLength);
1061 extern int32_t Graphics_isOverlappingRectangle(Graphics_Rectangle *psRect1,
1062  Graphics_Rectangle *psRect2);
1064  Graphics_Rectangle *psRect2,
1066  psIntersect);
1067 extern void Graphics_setBackgroundColor(Graphics_Context *context,
1068  int32_t value);
1069 extern uint16_t Graphics_getDisplayWidth(Graphics_Context *context);
1070 extern uint16_t Graphics_getDisplayHeight(Graphics_Context *context);
1071 extern void Graphics_setFont(Graphics_Context *context,
1072  const Graphics_Font *font);
1073 extern uint8_t Graphics_getFontBaseline(const Graphics_Font *font);
1074 extern void Graphics_setForegroundColor(Graphics_Context *context,
1075  int32_t value);
1077  int32_t value);
1078 extern uint8_t Graphics_getFontHeight(const Graphics_Font *font);
1079 extern uint8_t Graphics_getFontMaxWidth(const Graphics_Font *font);
1080 extern uint16_t Graphics_getImageColors(const Graphics_Image *image);
1081 extern uint16_t Graphics_getImageHeight(const Graphics_Image *image);
1082 extern uint16_t Graphics_getImageWidth(const Graphics_Image *image);
1083 extern uint32_t Graphics_getOffscreen1BppImageSize(uint16_t width,
1084  uint16_t height);
1085 extern uint32_t Graphics_getOffscreen4BppImageSize(uint16_t width,
1086  uint16_t height);
1087 extern uint32_t Graphics_getOffScreen8BPPSize(uint16_t width,
1088  uint16_t height);
1089 extern void Graphics_drawStringCentered(const Graphics_Context *context,
1090  int8_t *string,
1091  int32_t length,
1092  int32_t x,
1093  int32_t y,
1094  bool opaque);
1095 extern uint8_t Graphics_getStringHeight(const Graphics_Context *context);
1096 extern uint8_t Graphics_getStringMaxWidth(const Graphics_Context *context);
1097 extern uint8_t Graphics_getStringBaseline(const Graphics_Context *context);
1098 extern uint32_t Graphics_translateColorOnDisplay(
1099  const Graphics_Display *display,
1100  uint32_t value);
1102  const Graphics_Display *display,
1103  uint16_t x1,
1104  uint16_t x2,
1105  uint16_t y,
1106  uint32_t value);
1107 extern void Graphics_drawVerticalLineOnDisplay(const Graphics_Display *display,
1108  uint16_t x,
1109  uint16_t y1,
1110  uint16_t y2,
1111  uint16_t value);
1112 extern void Graphics_fillRectangleOnDisplay(const Graphics_Display *display,
1113  const Graphics_Rectangle *rect,
1114  uint16_t value);
1115 extern void Graphics_flushOnDisplay(const Graphics_Display *display);
1116 extern void Graphics_drawPixel(const Graphics_Context *context,
1117  uint16_t x,
1118  uint16_t y);
1119 extern void Graphics_clearDisplay(const Graphics_Context *context);
1120 extern uint16_t Graphics_getHeightOfDisplay(const Graphics_Display *display);
1121 extern void Graphics_flushBuffer(const Graphics_Context *context);
1122 extern uint16_t Graphics_getWidthOfDisplay(const Graphics_Display *display);
1123 extern bool Graphics_isPointWithinRectangle(const Graphics_Rectangle *rect,
1124  uint16_t x,
1125  uint16_t y);
1126 extern void Graphics_drawPixelOnDisplay(const Graphics_Display *display,
1127  uint16_t x,
1128  uint16_t y,
1129  uint16_t value);
1130 extern void Graphics_clearDisplayOnDisplay(const Graphics_Display *display,
1131  uint16_t value);
1133  const Graphics_Display *display,
1134  uint16_t x,
1135  uint16_t y,
1136  uint16_t x0,
1137  uint16_t count,
1138  uint16_t bPP,
1139  const uint8_t *data,
1140  const uint32_t *pucPalette);
1142  uint8_t *image,
1143  int32_t width,
1144  int32_t height);
1146  uint8_t *image,
1147  int32_t width,
1148  int32_t height);
1150  uint32_t *ppalette,
1151  uint32_t offset,
1152  uint32_t count);
1154  uint8_t *image,
1155  int32_t width,
1156  int32_t height);
1158  uint32_t *ppalette,
1159  uint32_t offset,
1160  uint32_t count);
1161 
1162 //*****************************************************************************
1163 //
1164 // Mark the end of the C bindings section for C++ compilers.
1165 //
1166 //*****************************************************************************
1167 #ifdef __cplusplus
1168 }
1169 #endif
1170 
1171 //*****************************************************************************
1172 //
1173 // Close the Doxygen group.
1175 //
1176 //*****************************************************************************
1177 
1178 #endif // __GRLIB_H__
void Graphics_initOffscreen1BppImage(Graphics_Display *display, uint8_t *image, int32_t width, int32_t height)
uint8_t Graphics_getStringMaxWidth(const Graphics_Context *context)
Definition: string.c:832
const Graphics_Font g_sFontCm36b
Definition: fontcm36b.c:416
void Graphics_drawLine(const Graphics_Context *context, int32_t x1, int32_t y1, int32_t x2, int32_t y2)
Definition: line.c:473
const Graphics_Font g_sFontCmss22b
Definition: fontcmss22b.c:260
const Graphics_Font g_sFontCmsc26
Definition: fontcmsc26.c:315
Definition: grlib.h:93
const Graphics_Font g_sFontCmss28i
Definition: fontcmss28i.c:308
const Graphics_Font g_sFontCmss12
Definition: fontcmss12.c:174
const Graphics_Font g_sFontCm20
Definition: fontcm20.c:265
const Graphics_Font g_sFontCm38
Definition: fontcm38.c:430
const Graphics_Font g_sFontCmss30i
Definition: fontcmss30i.c:341
const Graphics_Font g_sFontCmss24b
Definition: fontcmss24b.c:283
const Graphics_Font g_sFontCm48i
Definition: fontcm48i.c:644
const Graphics_Font g_sFontCmss26i
Definition: fontcmss26i.c:295
const Graphics_Font g_sFontCmss26
Definition: fontcmss26.c:290
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:219
This structure defines the characteristics of a display driver.
Definition: grlib.h:175
const Graphics_Font g_sFontCm34i
Definition: fontcm34i.c:423
int16_t yMin
The minimum Y coordinate of the rectangle.
Definition: grlib.h:96
const Graphics_Font g_sFontCmsc36
Definition: fontcmsc36.c:446
const Graphics_Font g_sFontCmtt34
Definition: fontcmtt34.c:395
const Graphics_Font g_sFontCm28b
Definition: fontcm28b.c:323
Definition: grlib.h:229
void Graphics_setBackgroundColor(Graphics_Context *context, int32_t value)
Definition: context.c:169
const Graphics_Font g_sFontCm42
Definition: fontcm42.c:500
This structure describes a font used for drawing text onto the screen.
Definition: grlib.h:189
const Graphics_Font g_sFontCm46b
Definition: fontcm46b.c:527
void Graphics_setOffscreen4BppPalette(Graphics_Display *display, uint32_t *ppalette, uint32_t offset, uint32_t count)
const uint8_t * pPixel
Pointer to pixel data;.
Definition: grlib.h:83
Definition: grlib.h:211
const Graphics_Font g_sFontCmtt24
Definition: fontcmtt24.c:267
const Graphics_Font g_sFontCmss20b
Definition: fontcmss20b.c:248
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:216
const Graphics_Font g_sFontCmsc28
Definition: fontcmsc28.c:337
Graphics_Rectangle clipRegion
The clipping region to be used when drawing onto the screen.
Definition: grlib.h:233
struct Graphics_Font Graphics_Font
This structure describes a font used for drawing text onto the screen.
const Graphics_Font g_sFontCm26b
Definition: fontcm26b.c:321
void Graphics_drawStringCentered(const Graphics_Context *context, int8_t *string, int32_t length, int32_t x, int32_t y, bool opaque)
Definition: string.c:784
const Graphics_Font g_sFontCm26
Definition: fontcm26.c:308
const Graphics_Font g_sFontCmss48
Definition: fontcmss48.c:546
const Graphics_Font g_sFontCm28
Definition: fontcm28.c:329
uint8_t maxWidth
The maximum width of a character; this is the width of the widest character in the font...
Definition: grlib.h:192
const Graphics_Font g_sFontCmsc42
Definition: fontcmsc42.c:532
void Graphics_drawString(const Graphics_Context *context, int8_t *string, int32_t lLength, int32_t x, int32_t y, bool opaque)
Definition: string.c:210
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:213
const Graphics_Font g_sFontCm48
Definition: fontcm48.c:596
const Graphics_Font g_sFontCm14
Definition: fontcm14.c:201
uint32_t Graphics_getOffScreen8BPPSize(uint16_t width, uint16_t height)
Definition: image.c:447
uint32_t Graphics_getOffscreen1BppImageSize(uint16_t width, uint16_t height)
Definition: image.c:409
void Graphics_drawHorizontalLineOnDisplay(const Graphics_Display *display, uint16_t x1, uint16_t x2, uint16_t y, uint32_t value)
Definition: display.c:124
struct Graphics_Display_Functions Graphics_Display_Functions
This structure defines the implementation of a display driver.
const Graphics_Font g_sFontCmss40i
Definition: fontcmss40i.c:444
const Graphics_Font g_sFontCm28i
Definition: fontcm28i.c:343
const Graphics_Font g_sFontCmss38
Definition: fontcmss38.c:393
void Graphics_setForegroundColorTranslated(Graphics_Context *context, int32_t value)
Definition: context.c:274
uint8_t maxWidth
The maximum width of a character; this is the width of the widest character in the font...
Definition: grlib.h:214
int32_t Graphics_getRectangleIntersection(Graphics_Rectangle *psRect1, Graphics_Rectangle *psRect2, Graphics_Rectangle *psIntersect)
Definition: rectangle.c:255
const Graphics_Font g_sFontCmss34i
Definition: fontcmss34i.c:382
uint16_t Graphics_getWidthOfDisplay(const Graphics_Display *display)
Definition: context.c:440
struct Graphics_Context Graphics_Context
uint32_t background
The background color used to draw primitives onto the screen.
Definition: grlib.h:235
const Graphics_Font g_sFontCmsc40
Definition: fontcmsc40.c:502
const Graphics_Font g_sFontCmsc30
Definition: fontcmsc30.c:358
const Graphics_Font g_sFontCmsc38
Definition: fontcmsc38.c:475
This structure defines the characteristics of a Bitmap Image.
Definition: grlib.h:76
const Graphics_Font g_sFontCmss32
Definition: fontcmss32.c:349
const Graphics_Font g_sFontCm46i
Definition: fontcm46i.c:613
const Graphics_Font g_sFontCmss32i
Definition: fontcmss32i.c:364
const Graphics_Font g_sFontCm18i
Definition: fontcm18i.c:252
const Graphics_Font g_sFontCmtt48
Definition: fontcmtt48.c:551
const Graphics_Font g_sFontCmsc18
Definition: fontcmsc18.c:241
const Graphics_Font g_sFontCmss18
Definition: fontcmss18.c:234
const Graphics_Font g_sFontCmss22i
Definition: fontcmss22i.c:256
const Graphics_Font g_sFontCmsc20
Definition: fontcmsc20.c:255
const Graphics_Font g_sFontCmtt20
Definition: fontcmtt20.c:249
const Graphics_Font g_sFontCmsc46
Definition: fontcmsc46.c:602
void Graphics_drawLineV(const Graphics_Context *context, int32_t x, int32_t y1, int32_t y2)
Definition: line.c:145
const uint8_t * data
A pointer to the data for the font.
Definition: grlib.h:220
bool Graphics_isPointWithinRectangle(const Graphics_Rectangle *rect, uint16_t x, uint16_t y)
Definition: rectangle.c:305
uint8_t first
The codepoint number representing the first character encoded in the font.
Definition: grlib.h:217
void Graphics_initOffscreen4BppImage(Graphics_Display *display, uint8_t *image, int32_t width, int32_t height)
const Graphics_Font g_sFontCm36i
Definition: fontcm36i.c:450
const Graphics_Font g_sFontCm42i
Definition: fontcm42i.c:536
void Graphics_setForegroundColor(Graphics_Context *context, int32_t value)
Definition: context.c:252
const Graphics_Font g_sFontCm14b
Definition: fontcm14b.c:196
void Graphics_clearDisplayOnDisplay(const Graphics_Display *display, uint16_t value)
Definition: display.c:237
const Graphics_Font g_sFontCmss34
Definition: fontcmss34.c:367
const Graphics_Font g_sFontCm22
Definition: fontcm22.c:265
uint32_t Graphics_translateColorOnDisplay(const Graphics_Display *display, uint32_t value)
Definition: display.c:201
int16_t xMin
The minimum X coordinate of the rectangle.
Definition: grlib.h:95
const Graphics_Font g_sFontCmss36b
Definition: fontcmss36b.c:381
struct Graphics_Rectangle Graphics_Rectangle
void Graphics_clearDisplay(const Graphics_Context *context)
Definition: context.c:396
uint8_t Graphics_getFontHeight(const Graphics_Font *font)
Definition: context.c:293
const Graphics_Font g_sFontCmsc48
Definition: fontcmsc48.c:625
const Graphics_Font g_sFontCm12i
Definition: fontcm12i.c:182
const Graphics_Font g_sFontCm22b
Definition: fontcm22b.c:282
const Graphics_Font g_sFontCmss40
Definition: fontcmss40.c:428
const Graphics_Font g_sFontCm26i
Definition: fontcm26i.c:317
const Graphics_Font g_sFontCm12
Definition: fontcm12.c:268
const Graphics_Font g_sFontCmss26b
Definition: fontcmss26b.c:297
const Graphics_Font g_sFontCmss32b
Definition: fontcmss32b.c:358
uint32_t foreground
The color used to draw primitives onto the screen.
Definition: grlib.h:234
const Graphics_Font g_sFontCm22i
Definition: fontcm22i.c:270
const Graphics_Font g_sFontCm20b
Definition: fontcm20b.c:264
const Graphics_Font g_sFontCmss34b
Definition: fontcmss34b.c:377
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:194
const uint32_t * pPalette
Pointer to Palette.
Definition: grlib.h:82
uint16_t xSize
xSize
Definition: grlib.h:79
const Graphics_Font g_sFontCmss16
Definition: fontcmss16.c:211
const Graphics_Font g_sFontCmtt22
Definition: fontcmtt22.c:250
uint16_t Graphics_getHeightOfDisplay(const Graphics_Display *display)
Definition: context.c:361
const Graphics_Font g_sFontCmss46b
Definition: fontcmss46b.c:518
uint16_t ySize
ySize
Definition: grlib.h:80
const Graphics_Font g_sFontCm40b
Definition: fontcm40b.c:470
const Graphics_Font g_sFontFixed6x8
Definition: fontfixed6x8.c:123
const Graphics_Font g_sFontCm48b
Definition: fontcm48b.c:551
const Graphics_Font g_sFontCmss16i
Definition: fontcmss16i.c:215
const Graphics_Font g_sFontCmsc14
Definition: fontcmsc14.c:203
const Graphics_Font g_sFontCmss46
Definition: fontcmss46.c:506
void Graphics_drawRectangle(const Graphics_Context *context, const Graphics_Rectangle *rect)
Definition: rectangle.c:56
const Graphics_Font g_sFontCm44
Definition: fontcm44.c:529
uint16_t width
The width of this display.
Definition: grlib.h:179
const Graphics_Font g_sFontCmtt14
Definition: fontcmtt14.c:195
void Graphics_flushOnDisplay(const Graphics_Display *display)
Definition: display.c:219
const Graphics_Font g_sFontCm38i
Definition: fontcm38i.c:457
const Graphics_Font g_sFontCmsc24
Definition: fontcmsc24.c:297
uint32_t Graphics_getOffscreen4BppImageSize(uint16_t width, uint16_t height)
Definition: image.c:428
const Graphics_Font g_sFontCmss30b
Definition: fontcmss30b.c:336
const Graphics_Font g_sFontCm34
Definition: fontcm34.c:408
const Graphics_Font g_sFontCmss12i
Definition: fontcmss12i.c:176
uint16_t numColors
Number of Colors in Palette.
Definition: grlib.h:81
const Graphics_Font g_sFontCm30
Definition: fontcm30.c:357
uint8_t bPP
Bits per pixel and Compressed/Uncompressed.
Definition: grlib.h:78
int16_t xMax
The maximum X coordinate of the rectangle.
Definition: grlib.h:97
const Graphics_Font g_sFontCmss38b
Definition: fontcmss38b.c:406
const Graphics_Font g_sFontCmtt40
Definition: fontcmtt40.c:449
uint16_t Graphics_getDisplayWidth(Graphics_Context *context)
Definition: context.c:327
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:215
uint16_t Graphics_getDisplayHeight(Graphics_Context *context)
Definition: context.c:344
const Graphics_Font g_sFontCmss48b
Definition: fontcmss48b.c:553
const Graphics_Font g_sFontCm40i
Definition: fontcm40i.c:504
const Graphics_Font g_sFontCmss24i
Definition: fontcmss24i.c:273
const Graphics_Font g_sFontCm42b
Definition: fontcm42b.c:489
const Graphics_Font g_sFontCm32
Definition: fontcm32.c:380
const Graphics_Font g_sFontCmss28
Definition: fontcmss28.c:304
int32_t size
The size of this structure.
Definition: grlib.h:177
const Graphics_Font g_sFontCmss20
Definition: fontcmss20.c:252
const uint8_t * data
A pointer to the data for the font.
Definition: grlib.h:196
uint16_t Graphics_getImageWidth(const Graphics_Image *image)
Definition: image.c:391
void Graphics_drawVerticalLineOnDisplay(const Graphics_Display *display, uint16_t x, uint16_t y1, uint16_t y2, uint16_t value)
Definition: display.c:151
const Graphics_Font g_sFontCmss14i
Definition: fontcmss14i.c:198
void Graphics_drawCircle(const Graphics_Context *context, int32_t x, int32_t y, int32_t lRadius)
Definition: circle.c:57
const Graphics_Font g_sFontCmtt26
Definition: fontcmtt26.c:280
const Graphics_Font g_sFontCmtt30
Definition: fontcmtt30.c:311
int16_t yMax
The maximum Y coordinate of the rectangle.
Definition: grlib.h:98
const Graphics_Font g_sFontCm18
Definition: fontcm18.c:245
void Graphics_fillRectangleOnDisplay(const Graphics_Display *display, const Graphics_Rectangle *rect, uint16_t value)
Definition: display.c:177
void * displayData
A pointer to display driver-specific data.
Definition: grlib.h:178
const Graphics_Font g_sFontCm16b
Definition: fontcm16b.c:222
void Graphics_drawLineH(const Graphics_Context *context, int32_t x1, int32_t x2, int32_t y)
Definition: line.c:60
const Graphics_Font g_sFontCm30b
Definition: fontcm30b.c:346
const Graphics_Font g_sFontCmtt46
Definition: fontcmtt46.c:516
int32_t size
The size of this structure.
Definition: grlib.h:231
void Graphics_drawPixel(const Graphics_Context *context, uint16_t x, uint16_t y)
Definition: context.c:414
const Graphics_Font g_sFontCmss18i
Definition: fontcmss18i.c:237
const Graphics_Font g_sFontCm18b
Definition: fontcm18b.c:240
const Graphics_Font g_sFontCm32i
Definition: fontcm32i.c:396
int32_t Graphics_isOverlappingRectangle(Graphics_Rectangle *psRect1, Graphics_Rectangle *psRect2)
const Graphics_Font g_sFontCm34b
Definition: fontcm34b.c:391
struct Graphics_Image Graphics_Image
This structure defines the characteristics of a Bitmap Image.
void Graphics_initContext(Graphics_Context *context, Graphics_Display *display, const Graphics_Display_Functions *pFxns)
Definition: context.c:59
const Graphics_Font g_sFontCm16i
Definition: fontcm16i.c:226
const Graphics_Font g_sFontCm46
Definition: fontcm46.c:562
uint8_t last
The codepoint number representing the last character encoded in the font.
Definition: grlib.h:218
const Graphics_Font g_sFontCmtt12
Definition: fontcmtt12.c:175
const Graphics_Font g_sFontCmss48i
Definition: fontcmss48i.c:575
const Graphics_Font g_sFontCm38b
Definition: fontcm38b.c:434
const Graphics_Font g_sFontCm32b
Definition: fontcm32b.c:372
const Graphics_Font g_sFontCm12b
Definition: fontcm12b.c:176
const Graphics_Font g_sFontCmss38i
Definition: fontcmss38i.c:412
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:193
const Graphics_Font g_sFontCmss42i
Definition: fontcmss42i.c:474
const Graphics_Font g_sFontCm40
Definition: fontcm40.c:469
const Graphics_Font g_sFontCmss20i
Definition: fontcmss20i.c:255
const Graphics_Font g_sFontCmss36i
Definition: fontcmss36i.c:387
const Graphics_Font g_sFontCmss44i
Definition: fontcmss44i.c:509
This structure defines the implementation of a display driver.
Definition: grlib.h:108
const Graphics_Font g_sFontCmtt18
Definition: fontcmtt18.c:234
const Graphics_Font g_sFontCm16
Definition: fontcm16.c:222
const Graphics_Font g_sFontCmss42b
Definition: fontcmss42b.c:461
void Graphics_setFont(Graphics_Context *context, const Graphics_Font *font)
Definition: context.c:212
const Graphics_Font g_sFontCmss44
Definition: fontcmss44.c:483
const Graphics_Font g_sFontCmtt16
Definition: fontcmtt16.c:216
const Graphics_Font g_sFontCmss18b
Definition: fontcmss18b.c:226
const Graphics_Font g_sFontCmtt38
Definition: fontcmtt38.c:426
const Graphics_Font g_sFontCm24b
Definition: fontcm24b.c:302
const Graphics_Font g_sFontCmss42
Definition: fontcmss42.c:452
void Graphics_drawImage(const Graphics_Context *context, const Graphics_Image *pBitmap, int16_t x, int16_t y)
Definition: image.c:103
void Graphics_fillCircle(const Graphics_Context *context, int32_t x, int32_t y, int32_t lRadius)
Definition: circle.c:323
uint8_t format
The format of the font. Can be one of FONT_FMT_UNCOMPRESSED or FONT_FMT_PIXEL_RLE.
Definition: grlib.h:191
void Graphics_initOffscreen8BppImage(Graphics_Display *display, uint8_t *image, int32_t width, int32_t height)
const Graphics_Font g_sFontCmss12b
Definition: fontcmss12b.c:189
const Graphics_Font g_sFontCmtt44
Definition: fontcmtt44.c:503
uint16_t heigth
The height of this display.
Definition: grlib.h:180
uint8_t Graphics_getStringBaseline(const Graphics_Context *context)
Definition: string.c:754
uint8_t Graphics_getFontBaseline(const Graphics_Font *font)
Definition: context.c:234
const Graphics_Font g_sFontCmsc12
Definition: fontcmsc12.c:185
struct Graphics_FontEx Graphics_FontEx
uint16_t Graphics_getImageHeight(const Graphics_Image *image)
Definition: image.c:375
const Graphics_Font g_sFontCmtt28
Definition: fontcmtt28.c:295
const Graphics_Font g_sFontCmss40b
Definition: fontcmss40b.c:439
const Graphics_Display_Functions * pFxns
Implementation of this display.
Definition: grlib.h:181
const Graphics_Font g_sFontCm44b
Definition: fontcm44b.c:523
const Graphics_Font g_sFontCm14i
Definition: fontcm14i.c:204
uint8_t Graphics_getStringHeight(const Graphics_Context *context)
Definition: string.c:813
const Graphics_Font * font
The font used to render text onto the screen.
Definition: grlib.h:236
const Graphics_Font g_sFontCmsc16
Definition: fontcmsc16.c:225
uint8_t Graphics_getFontMaxWidth(const Graphics_Font *font)
Definition: context.c:310
const Graphics_Font g_sFontCmss36
Definition: fontcmss36.c:370
const Graphics_Font g_sFontCmss44b
Definition: fontcmss44b.c:488
const Graphics_Font g_sFontCmtt32
Definition: fontcmtt32.c:379
const Graphics_Font g_sFontCmss30
Definition: fontcmss30.c:328
const Graphics_Font g_sFontCmsc44
Definition: fontcmsc44.c:573
const Graphics_Font g_sFontCmss28b
Definition: fontcmss28b.c:319
const Graphics_Font g_sFontCm20i
Definition: fontcm20i.c:269
const Graphics_Font g_sFontCmss46i
Definition: fontcmss46i.c:541
const Graphics_Font g_sFontCmss22
Definition: fontcmss22.c:253
const Graphics_Font g_sFontCmss14
Definition: fontcmss14.c:194
uint16_t Graphics_getImageColors(const Graphics_Image *image)
Definition: image.c:359
void Graphics_flushBuffer(const Graphics_Context *context)
Definition: context.c:380
const Graphics_Font g_sFontCmtt36
Definition: fontcmtt36.c:426
const Graphics_Font g_sFontCm30i
Definition: fontcm30i.c:376
int32_t Graphics_getStringWidth(const Graphics_Context *context, const int8_t *string, int32_t lLength)
Definition: string.c:90
void Graphics_setClipRegion(Graphics_Context *context, Graphics_Rectangle *rect)
Definition: context.c:121
void Graphics_setOffscreen8BppPalette(Graphics_Display *display, uint32_t *ppalette, uint32_t offset, uint32_t count)
const Graphics_Font g_sFontCm44i
Definition: fontcm44i.c:573
const Graphics_Font g_sFontCmsc34
Definition: fontcmsc34.c:405
const Graphics_Font g_sFontCmss16b
Definition: fontcmss16b.c:210
const Graphics_Font g_sFontCmss14b
Definition: fontcmss14b.c:191
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:91
const Graphics_Font g_sFontCm36
Definition: fontcm36.c:409
const Graphics_Font g_sFontCmss24
Definition: fontcmss24.c:271
void Graphics_fillRectangle(const Graphics_Context *context, const Graphics_Rectangle *rect)
Definition: rectangle.c:127
void Graphics_drawPixelOnDisplay(const Graphics_Display *display, uint16_t x, uint16_t y, uint16_t value)
Definition: display.c:58
const Graphics_Font g_sFontCmsc22
Definition: fontcmsc22.c:281
const Graphics_Font g_sFontCmtt42
Definition: fontcmtt42.c:472
const Graphics_Font g_sFontCmsc32
Definition: fontcmsc32.c:381
const Graphics_Display * display
The screen onto which drawing operations are performed.
Definition: grlib.h:232
const Graphics_Font g_sFontCm24i
Definition: fontcm24i.c:293
const Graphics_Font g_sFontCm24
Definition: fontcm24.c:287
Copyright 2018, Texas Instruments Incorporated