NucleoF446 re + SSD1331 simple Library
Dependents: Nucleo_446 Nucleo446_SSD1331
gfxfont.h@0:9442efe129e7, 2018-10-11 (annotated)
- Committer:
- kadonotakashi
- Date:
- Thu Oct 11 01:58:04 2018 +0000
- Revision:
- 0:9442efe129e7
success to Initilize SSD1331
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
kadonotakashi | 0:9442efe129e7 | 1 | // Font structures for newer Adafruit_GFX (1.1 and later). |
kadonotakashi | 0:9442efe129e7 | 2 | // Example fonts are included in 'Fonts' directory. |
kadonotakashi | 0:9442efe129e7 | 3 | // To use a font in your Arduino sketch, #include the corresponding .h |
kadonotakashi | 0:9442efe129e7 | 4 | // file and pass address of GFXfont struct to setFont(). Pass NULL to |
kadonotakashi | 0:9442efe129e7 | 5 | // revert to 'classic' fixed-space bitmap font. |
kadonotakashi | 0:9442efe129e7 | 6 | |
kadonotakashi | 0:9442efe129e7 | 7 | #ifndef _GFXFONT_H_ |
kadonotakashi | 0:9442efe129e7 | 8 | #define _GFXFONT_H_ |
kadonotakashi | 0:9442efe129e7 | 9 | |
kadonotakashi | 0:9442efe129e7 | 10 | /// Font data stored PER GLYPH |
kadonotakashi | 0:9442efe129e7 | 11 | typedef struct { |
kadonotakashi | 0:9442efe129e7 | 12 | uint16_t bitmapOffset; ///< Pointer into GFXfont->bitmap |
kadonotakashi | 0:9442efe129e7 | 13 | uint8_t width; ///< Bitmap dimensions in pixels |
kadonotakashi | 0:9442efe129e7 | 14 | uint8_t height; ///< Bitmap dimensions in pixels |
kadonotakashi | 0:9442efe129e7 | 15 | uint8_t xAdvance; ///< Distance to advance cursor (x axis) |
kadonotakashi | 0:9442efe129e7 | 16 | int8_t xOffset; ///< X dist from cursor pos to UL corner |
kadonotakashi | 0:9442efe129e7 | 17 | int8_t yOffset; ///< Y dist from cursor pos to UL corner |
kadonotakashi | 0:9442efe129e7 | 18 | } GFXglyph; |
kadonotakashi | 0:9442efe129e7 | 19 | |
kadonotakashi | 0:9442efe129e7 | 20 | /// Data stored for FONT AS A WHOLE |
kadonotakashi | 0:9442efe129e7 | 21 | typedef struct { |
kadonotakashi | 0:9442efe129e7 | 22 | uint8_t *bitmap; ///< Glyph bitmaps, concatenated |
kadonotakashi | 0:9442efe129e7 | 23 | GFXglyph *glyph; ///< Glyph array |
kadonotakashi | 0:9442efe129e7 | 24 | uint8_t first; ///< ASCII extents (first char) |
kadonotakashi | 0:9442efe129e7 | 25 | uint8_t last; ///< ASCII extents (last char) |
kadonotakashi | 0:9442efe129e7 | 26 | uint8_t yAdvance; ///< Newline distance (y axis) |
kadonotakashi | 0:9442efe129e7 | 27 | } GFXfont; |
kadonotakashi | 0:9442efe129e7 | 28 | |
kadonotakashi | 0:9442efe129e7 | 29 | #endif // _GFXFONT_H_ |