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