Canvas graphics library
0.1.0
This library is developed to perform canvas graphics in memory buffers
|
Go to the source code of this file.
Classes | |
struct | SFontHeaderRecord |
struct | SFixedFontInfo |
struct | SCharInfo |
struct | SAppMenu |
Macros | |
#define | SSD1306_MORE_CHARS_REQUIRED 0xffff |
#define | RGB_COLOR8(r, g, b) ( (r & 0xE0) | ((g >> 3)&0x1C) | (b>>6) ) |
#define | GRAY_COLOR4(gray) ( ((gray >> 4) & 0x0F) | (gray & 0xF0) ) |
#define | RGB_COLOR4(r, g, b) ( (r >> 2) + (g >> 1) + (b >> 2) ) |
#define | RGB8_TO_GRAY4(rgb) ( (rgb >> 6) + ((rgb >> 2) & 0x07) + (rgb & 0x03) ) |
#define | RGB_COLOR16(r, g, b) ( ((r<<8) & 0xF800) | ((g << 3)&0x07E0) | (b>>3) ) |
#define | RGB8_TO_RGB16(c) |
#define | RGB16_TO_RGB8(c) |
Typedefs | |
typedef int8_t | lcdint_t |
typedef uint8_t | lcduint_t |
Enumerations | |
enum | EFontStyle { STYLE_NORMAL, STYLE_BOLD, STYLE_ITALIC } |
enum | { CANVAS_MODE_BASIC = 0x00, CANVAS_TEXT_WRAP = 0x01, CANVAS_MODE_TRANSPARENT = 0x02, CANVAS_TEXT_WRAP_LOCAL = 0x04 } |
enum | EFontSize { FONT_SIZE_NORMAL = 0, FONT_SIZE_2X = 1, FONT_SIZE_4X = 2, FONT_SIZE_8X = 3 } |
Basic structures of canvas gfx library
Definition in file canvas_types.h.
#define GRAY_COLOR4 | ( | gray | ) | ( ((gray >> 4) & 0x0F) | (gray & 0xF0) ) |
Macro to generate 4-bit monochrome color from gray component
Definition at line 55 of file canvas_types.h.
#define RGB16_TO_RGB8 | ( | c | ) |
Macro to convert 5-6-5 color to 3-3-2 color
Definition at line 72 of file canvas_types.h.
#define RGB8_TO_GRAY4 | ( | rgb | ) | ( (rgb >> 6) + ((rgb >> 2) & 0x07) + (rgb & 0x03) ) |
Macro to convert 8-bit RGB to 4-bit monochrome format
Definition at line 61 of file canvas_types.h.
#define RGB8_TO_RGB16 | ( | c | ) |
Macro to convert 3-3-2 color to 5-6-5 color
Definition at line 67 of file canvas_types.h.
#define RGB_COLOR16 | ( | r, | |
g, | |||
b | |||
) | ( ((r<<8) & 0xF800) | ((g << 3)&0x07E0) | (b>>3) ) |
Macro to generate 16-bit RGB color
Definition at line 64 of file canvas_types.h.
#define RGB_COLOR4 | ( | r, | |
g, | |||
b | |||
) | ( (r >> 2) + (g >> 1) + (b >> 2) ) |
Macro to generate 4-bit monochrome color from RGB
Definition at line 58 of file canvas_types.h.
#define RGB_COLOR8 | ( | r, | |
g, | |||
b | |||
) | ( (r & 0xE0) | ((g >> 3)&0x1C) | (b>>6) ) |
Macro to generate 8-bit color
Definition at line 52 of file canvas_types.h.
#define SSD1306_MORE_CHARS_REQUIRED 0xffff |
Flag means that more chars are required to decode utf-8
Definition at line 43 of file canvas_types.h.
typedef int8_t lcdint_t |
internal int type, used by the library. Important for uC with low SRAM
Definition at line 79 of file canvas_types.h.
typedef uint8_t lcduint_t |
internal int type, used by the library. Important for uC with low SRAM
Definition at line 81 of file canvas_types.h.
anonymous enum |
Definition at line 97 of file canvas_types.h.
enum EFontSize |
Supported scale font values
Definition at line 109 of file canvas_types.h.
enum EFontStyle |
Supported font styles
Definition at line 90 of file canvas_types.h.