M5GFXは使用されるカラーデータ型によって、RGB888、RGB565、RGB332 を自動的に検出します。
| 型 | カラー |
|---|---|
| uint8_t | RGB332 |
| uint16_t | RGB565 |
| uint32_t | RGB888 |
| カラー | 16進値(Hex) | 赤(R) | 緑(G) | 青(B) |
|---|---|---|---|---|
| TFT_BLACK | 0x0000 | 0 | 0 | 0 |
| TFT_NAVY | 0x000F | 0 | 0 | 128 |
| TFT_DARKGREEN | 0x03E0 | 0 | 128 | 0 |
| TFT_DARKCYAN | 0x03EF | 0 | 128 | 128 |
| TFT_MAROON | 0x7800 | 128 | 0 | 0 |
| TFT_PURPLE | 0x780F | 128 | 0 | 128 |
| TFT_OLIVE | 0x7BE0 | 128 | 128 | 0 |
| TFT_LIGHTGREY | 0xD69A | 211 | 211 | 211 |
| TFT_LIGHTGRAY | 0xD69A | 211 | 211 | 211 |
| TFT_DARKGREY | 0x7BEF | 128 | 128 | 128 |
| TFT_DARKGRAY | 0x7BEF | 128 | 128 | 128 |
| TFT_BLUE | 0x001F | 0 | 0 | 255 |
| TFT_GREEN | 0x07E0 | 0 | 255 | 0 |
| TFT_CYAN | 0x07FF | 0 | 255 | 255 |
| TFT_RED | 0xF800 | 255 | 0 | 0 |
| TFT_MAGENTA | 0xF81F | 255 | 0 | 255 |
| TFT_YELLOW | 0xFFE0 | 255 | 255 | 0 |
| TFT_WHITE | 0xFFFF | 255 | 255 | 255 |
| TFT_ORANGE | 0xFDA0 | 255 | 180 | 0 |
| TFT_GREENYELLOW | 0xB7E0 | 180 | 255 | 0 |
| TFT_PINK | 0xFE19 | 255 | 192 | 203 |
| TFT_BROWN | 0x9A60 | 150 | 75 | 0 |
| TFT_GOLD | 0xFEA0 | 255 | 215 | 0 |
| TFT_SILVER | 0xC618 | 192 | 192 | 192 |
| TFT_SKYBLUE | 0x867D | 135 | 206 | 235 |
| TFT_VIOLET | 0x915C | 180 | 46 | 226 |
| TFT_TRANSPARENT | 0x0120 |
| 値 | ビット | カラー数 |
|---|---|---|
| 1 | 1 bit | 2 |
| 2 | 2 bit | 4 |
| 4 | 4 bit | 16 |
| 8 | 8 bit | 256 |
| 16 | 16 bit | 65,536 |
| 24 | 24 bit | 16,777,216 |
| タイプ | 説明 |
|---|---|
| epd_quality | 高精細描画、速度は遅い |
| epd_text | ↑ |
| epd_fast | ↓ |
| epd_fastest | 高速描画(画質は低下) |
テキスト描画の基準座標を指定
| 左寄せ | 中央寄せ | 右寄せ |
|---|---|---|
| top_left | top_center | top_right |
| middle_left | middle_center | middle_right |
| bottom_left | bottom_center | bottom_right |
| baseline_left | baseline_center | baseline_right |
| パラメータ | 型 | 説明 |
|---|---|---|
| fore_rgb888 | uint32_t | フォントカラー |
| back_rgb888 | uint32_t | 背景色 |
| size_x | float | テキストx座標 |
| size_y | float | テキストy座標 |
| datum | textdatum_t | テキスト基準 |
| padding_x | int32_t | X パディング |
| utf8 | bool | UTF8 エンコード |
| cp437 | bool | cp437 エンコード |
| パラメータ | 型 | 説明 |
|---|---|---|
| x | int16_t | X 座標 |
| y | int16_t | Y 座標 |
| size | uint16_t | 点サイズ |
| id | uint8_t | 点ID |
draw/push 関数とは異なり、write 関数は startWrite, endWrite で定義されていません。draw/push 関数は内部で自動的に startWrite および endWrite を実行します。そのため、連続的に複数描画操作を行う場合、処理速度が若干遅くなる場合があります。この場合、startWrite と endWrite で囲んで、すべての draw/push 関数をまとめて実行すると速度が向上します。
| write(read) | draw or push (etc) |
|---|---|
| writePixel | drawPixel |
| writePixels | pushPixels |
| writePixelsDMA | pushPixelsDMA |
| writeFastHLine | drawFastHLine |
| writeFastVLine | drawFastVLine |
| writeFillRect | fillRect |
| writeColor | |
| pushBlock |
pushBlock はライブラリバージョン互換性のため writeBlock という名前ではありません。| フォント名 | 備考 |
|---|---|
| &fonts::Font0 | |
| &fonts::Font2 | |
| &fonts::Font4 | |
| &fonts::Font6 | |
| &fonts::Font7 | |
| &fonts::Font8 | |
| &fonts::Font8x8C64 | |
| &fonts::AsciiFont8x16 | |
| &fonts::AsciiFont24x48 | |
| &fonts::TomThumb | |
| &fonts::FreeMono9pt7b | |
| &fonts::FreeMono12pt7b | |
| &fonts::FreeMono18pt7b | |
| &fonts::FreeMono24pt7b | |
| &fonts::FreeMonoBold9pt7b | |
| &fonts::FreeMonoBold12pt7b | |
| &fonts::FreeMonoBold18pt7b | |
| &fonts::FreeMonoBold24pt7b | |
| &fonts::FreeMonoOblique9pt7b | |
| &fonts::FreeMonoOblique12pt7b | |
| &fonts::FreeMonoOblique18pt7b | |
| &fonts::FreeMonoOblique24pt7b | |
| &fonts::FreeMonoBoldOblique9pt7b | |
| &fonts::FreeMonoBoldOblique12pt7b | |
| &fonts::FreeMonoBoldOblique18pt7b | |
| &fonts::FreeMonoBoldOblique24pt7b | |
| &fonts::FreeSans9pt7b | |
| &fonts::FreeSans12pt7b | |
| &fonts::FreeSans18pt7b | |
| &fonts::FreeSans24pt7b | |
| &fonts::FreeSansBold9pt7b | |
| &fonts::FreeSansBold12pt7b | |
| &fonts::FreeSansBold18pt7b | |
| &fonts::FreeSansBold24pt7b | |
| &fonts::FreeSansOblique9pt7b | |
| &fonts::FreeSansOblique12pt7b | |
| &fonts::FreeSansOblique18pt7b | |
| &fonts::FreeSansOblique24pt7b | |
| &fonts::FreeSansBoldOblique9pt7b | |
| &fonts::FreeSansBoldOblique12pt7b | |
| &fonts::FreeSansBoldOblique18pt7b | |
| &fonts::FreeSansBoldOblique24pt7b | |
| &fonts::FreeSerif9pt7b | |
| &fonts::FreeSerif12pt7b | |
| &fonts::FreeSerif18pt7b | |
| &fonts::FreeSerif24pt7b | |
| &fonts::FreeSerifItalic9pt7b | |
| &fonts::FreeSerifItalic12pt7b | |
| &fonts::FreeSerifItalic18pt7b | |
| &fonts::FreeSerifItalic24pt7b | |
| &fonts::FreeSerifBold9pt7b | |
| &fonts::FreeSerifBold12pt7b | |
| &fonts::FreeSerifBold18pt7b | |
| &fonts::FreeSerifBold24pt7b | |
| &fonts::FreeSerifBoldItalic9pt7b | |
| &fonts::FreeSerifBoldItalic12pt7b | |
| &fonts::FreeSerifBoldItalic18pt7b | |
| &fonts::FreeSerifBoldItalic24pt7b | |
| &fonts::Orbitron_Light_24 | |
| &fonts::Orbitron_Light_32 | |
| &fonts::Roboto_Thin_24 | |
| &fonts::Satisfy_24 | |
| &fonts::Yellowtail_32 | |
| &fonts::DejaVu12 | |
| &fonts::DejaVu18 | |
| &fonts::DejaVu24 | |
| &fonts::DejaVu40 | |
| &fonts::DejaVu56 | |
| &fonts::DejaVu72 | |
| &fonts::DejaVu9 |
| フォント名 | 言語コード |
|---|---|
| &fonts::lgfxJapanMincho_8 | JA |
| &fonts::lgfxJapanMincho_12 | JA |
| &fonts::lgfxJapanMincho_16 | JA |
| &fonts::lgfxJapanMincho_20 | JA |
| &fonts::lgfxJapanMincho_24 | JA |
| &fonts::lgfxJapanMincho_28 | JA |
| &fonts::lgfxJapanMincho_32 | JA |
| &fonts::lgfxJapanMincho_36 | JA |
| &fonts::lgfxJapanMincho_40 | JA |
| &fonts::lgfxJapanMinchoP_8 | JA |
| &fonts::lgfxJapanMinchoP_12 | JA |
| &fonts::lgfxJapanMinchoP_16 | JA |
| &fonts::lgfxJapanMinchoP_20 | JA |
| &fonts::lgfxJapanMinchoP_24 | JA |
| &fonts::lgfxJapanMinchoP_28 | JA |
| &fonts::lgfxJapanMinchoP_32 | JA |
| &fonts::lgfxJapanMinchoP_36 | JA |
| &fonts::lgfxJapanMinchoP_40 | JA |
| &fonts::lgfxJapanGothic_8 | JA |
| &fonts::lgfxJapanGothic_12 | JA |
| &fonts::lgfxJapanGothic_16 | JA |
| &fonts::lgfxJapanGothic_20 | JA |
| &fonts::lgfxJapanGothic_24 | JA |
| &fonts::lgfxJapanGothic_28 | JA |
| &fonts::lgfxJapanGothic_32 | JA |
| &fonts::lgfxJapanGothic_36 | JA |
| &fonts::lgfxJapanGothic_40 | JA |
| &fonts::lgfxJapanGothicP_8 | JA |
| &fonts::lgfxJapanGothicP_12 | JA |
| &fonts::lgfxJapanGothicP_16 | JA |
| &fonts::lgfxJapanGothicP_20 | JA |
| &fonts::lgfxJapanGothicP_24 | JA |
| &fonts::lgfxJapanGothicP_28 | JA |
| &fonts::lgfxJapanGothicP_32 | JA |
| &fonts::lgfxJapanGothicP_36 | JA |
| &fonts::lgfxJapanGothicP_40 | JA |
| &fonts::efontCN_10 | zh-CN |
| &fonts::efontCN_10_b | zh-CN |
| &fonts::efontCN_10_bi | zh-CN |
| &fonts::efontCN_10_i | zh-CN |
| &fonts::efontCN_12 | zh-CN |
| &fonts::efontCN_12_b | zh-CN |
| &fonts::efontCN_12_bi | zh-CN |
| &fonts::efontCN_12_i | zh-CN |
| &fonts::efontCN_14 | zh-CN |
| &fonts::efontCN_14_b | zh-CN |
| &fonts::efontCN_14_bi | zh-CN |
| &fonts::efontCN_14_i | zh-CN |
| &fonts::efontCN_16 | zh-CN |
| &fonts::efontCN_16_b | zh-CN |
| &fonts::efontCN_16_bi | zh-CN |
| &fonts::efontCN_16_i | zh-CN |
| &fonts::efontCN_24 | zh-CN |
| &fonts::efontCN_24_b | zh-CN |
| &fonts::efontCN_24_bi | zh-CN |
| &fonts::efontCN_24_i | zh-CN |
| &fonts::efontJA_10 | JA |
| &fonts::efontJA_10_b | JA |
| &fonts::efontJA_10_bi | JA |
| &fonts::efontJA_10_i | JA |
| &fonts::efontJA_12 | JA |
| &fonts::efontJA_12_b | JA |
| &fonts::efontJA_12_bi | JA |
| &fonts::efontJA_12_i | JA |
| &fonts::efontJA_14 | JA |
| &fonts::efontJA_14_b | JA |
| &fonts::efontJA_14_bi | JA |
| &fonts::efontJA_14_i | JA |
| &fonts::efontJA_16 | JA |
| &fonts::efontJA_16_b | JA |
| &fonts::efontJA_16_bi | JA |
| &fonts::efontJA_16_i | JA |
| &fonts::efontJA_24 | JA |
| &fonts::efontJA_24_b | JA |
| &fonts::efontJA_24_bi | JA |
| &fonts::efontJA_24_i | JA |
| &fonts::efontKR_10 | KR |
| &fonts::efontKR_10_b | KR |
| &fonts::efontKR_10_bi | KR |
| &fonts::efontKR_10_i | KR |
| &fonts::efontKR_12 | KR |
| &fonts::efontKR_12_b | KR |
| &fonts::efontKR_12_bi | KR |
| &fonts::efontKR_12_i | KR |
| &fonts::efontKR_14 | KR |
| &fonts::efontKR_14_b | KR |
| &fonts::efontKR_14_bi | KR |
| &fonts::efontKR_14_i | KR |
| &fonts::efontKR_16 | KR |
| &fonts::efontKR_16_b | KR |
| &fonts::efontKR_16_bi | KR |
| &fonts::efontKR_16_i | KR |
| &fonts::efontKR_24 | KR |
| &fonts::efontKR_24_b | KR |
| &fonts::efontKR_24_bi | KR |
| &fonts::efontKR_24_i | KR |
| &fonts::efontTW_10 | zh-TW |
| &fonts::efontTW_10_b | zh-TW |
| &fonts::efontTW_10_bi | zh-TW |
| &fonts::efontTW_10_i | zh-TW |
| &fonts::efontTW_12 | zh-TW |
| &fonts::efontTW_12_b | zh-TW |
| &fonts::efontTW_12_bi | zh-TW |
| &fonts::efontTW_12_i | zh-TW |
| &fonts::efontTW_14 | zh-TW |
| &fonts::efontTW_14_b | zh-TW |
| &fonts::efontTW_14_bi | zh-TW |
| &fonts::efontTW_14_i | zh-TW |
| &fonts::efontTW_16 | zh-TW |
| &fonts::efontTW_16_b | zh-TW |
| &fonts::efontTW_16_bi | zh-TW |
| &fonts::efontTW_16_i | zh-TW |
| &fonts::efontTW_24 | zh-TW |
| &fonts::efontTW_24_b | zh-TW |
| &fonts::efontTW_24_bi | zh-TW |
| &fonts::efontTW_24_i | zh-TW |