diff --git a/.gitignore b/.gitignore index 49eae98..79c1355 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ .vscode .idea __pycache__ -sphinx *~ *.pyc *.o diff --git a/docs/.buildinfo b/docs/.buildinfo index 26e2102..c734010 100644 --- a/docs/.buildinfo +++ b/docs/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 78614e3006fc5cc56d2562d24941cf0c +config: db5947919316628e816682c8ca6bb96d tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/_modules/index.html b/docs/_modules/index.html index a22a7e1..701b3bf 100644 --- a/docs/_modules/index.html +++ b/docs/_modules/index.html @@ -13,6 +13,8 @@ + + @@ -29,6 +31,7 @@ + @@ -82,7 +85,7 @@ -
Contents:
+Contents:
Contents:
+Contents:
Contents:
+Contents:
1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 | """
-lines.py
-
- Draws lines and rectangles in random colors at random locations on the
- display.
-
-"""
-import random
-from machine import Pin, SoftSPI
-import st7789py as st7789
-
-
-def main():
- spi = SoftSPI(
- baudrate=20000000,
- polarity=1,
- phase=0,
- sck=Pin(18),
- mosi=Pin(19),
- miso=Pin(13))
-
- tft = st7789.ST7789(
- spi,
- 135,
- 240,
- reset=Pin(23, Pin.OUT),
- cs=Pin(5, Pin.OUT),
- dc=Pin(16, Pin.OUT),
- backlight=Pin(4, Pin.OUT),
- rotation=0)
-
- tft.fill(st7789.BLACK)
-
- while True:
- tft.line(
- random.randint(0, tft.width),
- random.randint(0, tft.height),
- random.randint(0, tft.width),
- random.randint(0, tft.height),
- st7789.color565(
- random.getrandbits(8),
- random.getrandbits(8),
- random.getrandbits(8)
- )
- )
-
- width = random.randint(0, tft.width // 2)
- height = random.randint(0, tft.height // 2)
- col = random.randint(0, tft.width - width)
- row = random.randint(0, tft.height - height)
- tft.fill_rect(
- col,
- row,
- width,
- height,
- st7789.color565(
- random.getrandbits(8),
- random.getrandbits(8),
- random.getrandbits(8)
- )
- )
-
-
-main()
+ |
1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 -70 -71 -72 -73 | """
-ttgo_hello.py
-
- Writes "Hello!" in random colors at random locations on a
- LILYGO® TTGO T-Display.
-
- https://www.youtube.com/watch?v=atBa0BYPAAc
-
-"""
-import random
-from machine import Pin, SoftSPI
-import st7789py as st7789
-
-# Choose a font
-
-# from romfonts import vga1_8x8 as font
-# from romfonts import vga2_8x8 as font
-# from romfonts import vga1_8x16 as font
-# from romfonts import vga2_8x16 as font
-# from romfonts import vga1_16x16 as font
-# from romfonts import vga1_bold_16x16 as font
-# from romfonts import vga2_16x16 as font
-# from romfonts import vga2_bold_16x16 as font
-# from romfonts import vga1_16x32 as font
-# from romfonts import vga1_bold_16x32 as font
-# from romfonts import vga2_16x32 as font
-from romfonts import vga2_bold_16x32 as font
-
-
-def main():
- spi = SoftSPI(
- baudrate=20000000,
- polarity=1,
- phase=0,
- sck=Pin(18),
- mosi=Pin(19),
- miso=Pin(13))
-
- tft = st7789.ST7789(
- spi,
- 135,
- 240,
- reset=Pin(23, Pin.OUT),
- cs=Pin(5, Pin.OUT),
- dc=Pin(16, Pin.OUT),
- backlight=Pin(4, Pin.OUT),
- rotation=0)
-
- while True:
- for rotation in range(4):
- tft.rotation(rotation)
- tft.fill(0)
- col_max = tft.width - font.WIDTH*6
- row_max = tft.height - font.HEIGHT
-
- for _ in range(100):
- tft.text(
- font,
- "Hello!",
- random.randint(0, col_max),
- random.randint(0, row_max),
- st7789.color565(
- random.getrandbits(8),
- random.getrandbits(8),
- random.getrandbits(8)),
- st7789.color565(
- random.getrandbits(8),
- random.getrandbits(8),
- random.getrandbits(8))
- )
-
-
-main()
+ |
1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 -70 -71 -72 | """
-ttgo_fonts.py
-
- Pages through all characters of four fonts on the LILYGO® TTGO T-Display.
-
- https://www.youtube.com/watch?v=2cnAhEucPD4
-
-"""
-import utime
-from machine import Pin, SoftSPI
-import st7789py as st7789
-
-# Choose fonts
-
-# from romfonts import vga1_8x8 as font
-from romfonts import vga2_8x8 as font1
-# from romfonts import vga1_8x16 as font
-from romfonts import vga2_8x16 as font2
-# from romfonts import vga1_16x16 as font
-# from romfonts import vga1_bold_16x16 as font
-# from romfonts import vga2_16x16 as font
-from romfonts import vga2_bold_16x16 as font3
-# from romfonts import vga1_16x32 as font
-# from romfonts import vga1_bold_16x32 as font
-# from romfonts import vga2_16x32 as font
-from romfonts import vga2_bold_16x32 as font4
-
-
-def main():
- spi = SoftSPI(
- baudrate=20000000,
- polarity=1,
- phase=0,
- sck=Pin(18),
- mosi=Pin(19),
- miso=Pin(13))
-
- tft = st7789.ST7789(
- spi,
- 135,
- 240,
- reset=Pin(23, Pin.OUT),
- cs=Pin(5, Pin.OUT),
- dc=Pin(16, Pin.OUT),
- backlight=Pin(4, Pin.OUT),
- rotation=0)
-
- tft.vscrdef(40, 240, 40)
-
- while True:
- for font in (font1, font2, font3, font4):
- tft.fill(st7789.BLUE)
- line = 0
- col = 0
-
- for char in range(font.FIRST, font.LAST):
- tft.text(font, chr(char), col, line, st7789.WHITE, st7789.BLUE)
- col += font.WIDTH
- if col > tft.width - font.WIDTH:
- col = 0
- line += font.HEIGHT
-
- if line > tft.height-font.HEIGHT:
- utime.sleep(3)
- tft.fill(st7789.BLUE)
- line = 0
- col = 0
-
- utime.sleep(3)
-
-
-main()
+ |
1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 -70 -71 -72 -73 -74 -75 -76 | """
-ttgo_fonts.py
-
- Smoothly scrolls all font characters up the screen on the LILYGO® TTGO
- T-Display. Only works with fonts with heights that are even multiples of
- the screen height, (i.e. 8 or 16 pixels high)
-
-"""
-import utime
-import random
-from machine import Pin, SoftSPI
-import st7789py as st7789
-
-# choose a font
-
-# from romfonts import vga1_8x8 as font
-# from romfonts import vga2_8x8 as font
-# from romfonts import vga1_8x16 as font
-# from romfonts import vga2_8x16 as font
-# from romfonts import vga1_16x16 as font
-# from romfonts import vga1_bold_16x16 as font
-# from romfonts import vga2_16x16 as font
-from romfonts import vga2_bold_16x16 as font
-
-
-def main():
- spi = SoftSPI(
- baudrate=20000000,
- polarity=1,
- phase=0,
- sck=Pin(18),
- mosi=Pin(19),
- miso=Pin(13))
-
- tft = st7789.ST7789(
- spi,
- 135,
- 240,
- reset=Pin(23, Pin.OUT),
- cs=Pin(5, Pin.OUT),
- dc=Pin(16, Pin.OUT),
- backlight=Pin(4, Pin.OUT),
- rotation=0)
-
- last_line = tft.height - font.HEIGHT
- tfa = 40
- tfb = 40
- tft.vscrdef(tfa, 240, tfb)
-
- tft.fill(st7789.BLUE)
- scroll = 0
- character = 0
- while True:
- tft.fill_rect(0, scroll, tft.width, 1, st7789.BLUE)
-
- if scroll % font.HEIGHT == 0:
- tft.text(
- font,
- '\\x{:02x}= {:s} '.format(character, chr(character)),
- 0,
- (scroll + last_line) % tft.height,
- st7789.WHITE,
- st7789.BLUE)
-
- character = character + 1 if character < 256 else 0
-
- tft.vscsad(scroll + tfa)
- scroll += 1
-
- if scroll == tft.height:
- scroll = 0
-
- utime.sleep(0.01)
-
-
-main()
+ |
Flying toasters sprite demo using bitmaps created from spritesheet using ImageMagick’s convert and imgtobitmap.py utility. See the maketoast script in the utils directory for details.
-1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 -70 -71 -72 -73 -74 -75 -76 -77 -78 -79 -80 -81 -82 -83 -84 -85 -86 -87 -88 -89 -90 -91 -92 -93 -94 -95 -96 | """
-toasters.py
-
- An example using bitmap to draw sprites on the display.
-
- Spritesheet from CircuitPython_Flying_Toasters
- https://learn.adafruit.com/circuitpython-sprite-animation-pendant-mario-clouds-flying-toasters
-
-"""
-
-import random
-from machine import Pin, SoftSPI
-import st7789py as st7789
-import t1, t2, t3, t4, t5
-
-TOASTERS = [t1, t2, t3, t4]
-TOAST = [t5]
-
-
-class toast():
- '''
- toast class to keep track of a sprites locaton and step
- '''
- def __init__(self, sprites, x, y):
- self.sprites = sprites
- self.steps = len(sprites)
- self.x = x
- self.y = y
- self.step = random.randint(0, self.steps-1)
- self.speed = random.randint(2, 5)
-
- def move(self):
- if self.x <= 0:
- self.speed = random.randint(2, 5)
- self.x = 135 - 64
-
- self.step += 1
- self.step %= self.steps
- self.x -= self.speed
-
-
-def main():
- """
- Initialize the display and draw flying toasters and toast
- """
- spi = SoftSPI(
- baudrate=20000000,
- polarity=1,
- phase=0,
- sck=Pin(18),
- mosi=Pin(19),
- miso=Pin(13))
-
- tft = st7789.ST7789(
- spi,
- 135,
- 240,
- reset=Pin(23, Pin.OUT),
- cs=Pin(5, Pin.OUT),
- dc=Pin(16, Pin.OUT),
- backlight=Pin(4, Pin.OUT),
- rotation=0)
-
- tft.fill(st7789.BLACK)
- # create toast spites in random positions
- sprites = [
- toast(TOASTERS, 135-64, 0),
- toast(TOAST, 135-64*2, 80),
- toast(TOASTERS, 135-64*4, 160)
- ]
-
- # move and draw sprites
- while True:
- for man in sprites:
- bitmap = man.sprites[man.step]
- tft.fill_rect(
- man.x+bitmap.WIDTH-man.speed,
- man.y,
- man.speed,
- bitmap.HEIGHT,
- st7789.BLACK)
-
- man.move()
-
- if man.x > 0:
- tft.bitmap(bitmap, man.x, man.y)
- else:
- tft.fill_rect(
- 0,
- man.y,
- bitmap.WIDTH,
- bitmap.HEIGHT,
- st7789.BLACK)
-
-
-main()
+ |
Test for font2bitmap converter for the driver. See the font2bitmap program in the utils directory.
-1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 | """
-chango.py
-
- Test for font2bitmap converter for the driver.
- See the font2bitmap program in the utils directory.
-"""
-
-from machine import Pin, SoftSPI
-import st7789py as st7789
-import gc
-from truetype import chango_16 as font_16
-from truetype import chango_32 as font_32
-from truetype import chango_64 as font_64
-
-gc.collect()
-
-
-def main():
- # enable display and clear screen
- spi = SoftSPI(
- baudrate=20000000,
- polarity=1,
- phase=0,
- sck=Pin(18),
- mosi=Pin(19),
- miso=Pin(13))
-
- tft = st7789.ST7789(
- spi,
- 135,
- 240,
- reset=Pin(23, Pin.OUT),
- cs=Pin(5, Pin.OUT),
- dc=Pin(16, Pin.OUT),
- backlight=Pin(4, Pin.OUT),
- rotation=1)
-
- tft.fill(st7789.BLACK)
-
- row = 0
- tft.write(font_16, "abcdefghijklmnopqrst", 0, row, st7789.RED)
- row += font_16.HEIGHT
-
- tft.write(font_32, "abcdefghij", 0, row, st7789.GREEN)
- row += font_32.HEIGHT
-
- tft.write(font_64, "abcd", 0, row, st7789.BLUE)
- row += font_64.HEIGHT
-
-
-main()
+ |
Test for font2bitmap converter for the driver. See the font2bitmap program in the utils directory.
-1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 | """
-noto_fonts Writes the names of three Noto fonts centered on the display
- using the font. The fonts were converted from True Type fonts using
- the font2bitmap utility.
-"""
-
-from machine import SoftSPI, Pin
-import st7789py as st7789
-
-from truetype import NotoSans_32 as noto_sans
-from truetype import NotoSerif_32 as noto_serif
-from truetype import NotoSansMono_32 as noto_mono
-
-
-def main():
-
- def center(font, string, row, color=st7789.WHITE):
- screen = tft.width # get screen width
- width = tft.write_width(font, string) # get the width of the string
- if width and width < screen: # if the string < display
- col = tft.width // 2 - width // 2 # find the column to center
- else: # otherwise
- col = 0 # left justify
-
- tft.write(font, string, col, row, color) # and write the string
-
- try:
- spi = SoftSPI(
- baudrate=20000000,
- polarity=1,
- phase=0,
- sck=Pin(18),
- mosi=Pin(19),
- miso=Pin(13))
-
- tft = st7789.ST7789(
- spi,
- 135,
- 240,
- reset=Pin(23, Pin.OUT),
- cs=Pin(5, Pin.OUT),
- dc=Pin(16, Pin.OUT),
- backlight=Pin(4, Pin.OUT),
- rotation=1)
-
- # enable display and clear screen
- tft.fill(st7789.BLACK)
-
- row = 16
-
- # center the name of the first font, using the font
- center(noto_sans, "NotoSans", row, st7789.RED)
- row += noto_sans.HEIGHT
-
- # center the name of the second font, using the font
- center(noto_serif, "NotoSerif", row, st7789.GREEN)
- row += noto_serif.HEIGHT
-
- # center the name of the third font, using the font
- center(noto_mono, "NotoSansMono", row, st7789.BLUE)
- row += noto_mono.HEIGHT
-
- finally:
- # shutdown spi
- if 'spi' in locals():
- spi.deinit()
-
-
-main()
+ |
Contents:
+Contents:
1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 | """converted from vga_8x8.bin """
-
-# font width
-WIDTH = 8
-
-# font height
-HEIGHT = 8
-
-# first character in front
-FIRST = 0x20
-
-# last character in font
-LAST = 0x7f
-
-# bitmap of each character from FIRST to LAST
-_FONT =\
-b'\x00\x00\x00\x00\x00\x00\x00\x00'\
-b'\x18\x3c\x3c\x18\x18\x00\x18\x00'\
-b'\x66\x66\x24\x00\x00\x00\x00\x00'\
-
-... many more lines of data...
-
-b'\x70\x18\x18\x0e\x18\x18\x70\x00'\
-b'\x76\xdc\x00\x00\x00\x00\x00\x00'\
-b'\x00\x10\x38\x6c\xc6\xc6\xfe\x00'\
-
-FONT = memoryview(_FONT)
+ |
1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 | # -*- coding: utf-8 -*-
-# Converted from Chango-Regular.ttf using:
-# ./font2bitmap.py Chango-Regular.ttf 16 -c 0x20-0x7f
-
-# Maps the order of the character data
-MAP = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
-
-# Number of color bits per pixel, currently only 1 is used but could be
-# increased to support antialiased or smoothed fonts in the future.
-BPP = 1
-
-# Font height
-HEIGHT = 17
-
-# Font max width
-MAX_WIDTH = 24
-
-# one byte per character table of widths in the same order as the MAP string
-_WIDTHS = \
- b'\x06\x08\x0a\x0e\x0d\x18\x10\x06\x08\x08\x0a\x0d\x06\x08\x06\x0b'\
-
- ... more lines of data...
-
- b'\x0d\x0d\x0b\x0a\x0b\x0e\x0c\x12\x0d\x0c\x0b\x09\x06\x09\x0e\x0b'
-
-# OFFSET_WIDTH bytes per character in the same order as the MAP string
-# to the start of each character in bits.
-OFFSET_WIDTH = 2
-_OFFSETS = \
- b'\x00\x00\x00\x66\x00\xee\x01\x98\x02\x86\x03\x63\x04\xfb\x06\x0b'\
-
- ... more lines of data...
-
- b'\x49\x94\x4a\x71\x4b\x3d\x4b\xf8\x4c\x91\x4c\xf7\x4d\x90\x4e\x7e'
-
-# character bitmaps per character in the same order as the MAP string.
-# Note: character data may not start on byte boundaries
-_BITMAPS =\
- b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61'\
-
- ... many more lines of data...
-
- b'\x3d\xe3\xfc\x00\x00\x00\x00\x00'
-
-WIDTHS = memoryview(_WIDTHS)
-OFFSETS = memoryview(_OFFSETS)
-BITMAPS = memoryview(_BITMAPS)
+ |
vga1_8x8.py: 128 Character 8x8 Font¶
@@ -378,8 +309,8 @@ the negative glyph.left fix from peterhinch’s font conversion programvga1_8x16.py: 128 Character 8x16 Font¶
@@ -396,7 +327,7 @@ the negative glyph.left fix from peterhinch’s font conversion programvga1_16x16.py: 128 Character 16x16 Thin Font¶
@@ -426,8 +357,8 @@ the negative glyph.left fix from peterhinch’s font conversion programvga1_16x32.py: 128 Character 16x32 Thin Font¶
diff --git a/docs/genindex.html b/docs/genindex.html index c736913..868647b 100644 --- a/docs/genindex.html +++ b/docs/genindex.html @@ -13,6 +13,8 @@ + + @@ -29,6 +31,7 @@ + @@ -82,7 +85,7 @@ -Contents:
+Contents:
Contents:
+Contents:
Contents:
+Contents:
Contents:
+Contents:
Contents:
+Contents:
Contents:
+Contents:
Drawing converted bitmaps
st7789py.
color565
(red, green=0, blue=0)[source]¶Convert red, green and blue values (0-255) into a 16-bit 565 encoding.
st7789py.
ST7789
(spi, width, height, reset, dc, cs=None, backlight=None, rotation=0)[source]¶ST7789 driver class
spi (spi) – spi object
width (int) – display width
height (int) – display height
spi (spi) – spi object Required
width (int) – display width Required
height (int) – display height Required
reset (pin) – reset pin
dc (pin) – dc pin
dc (pin) – dc pin Required
cs (pin) – cs pin
backlight (pin) – backlight pin
rotation (int) – display rotation @@ -238,20 +241,20 @@ BIOS text mode fonts.
sleep_mode
(value)[source]¶Enable or disable display sleep mode.
inversion_mode
(value)[source]¶Enable or disable display inversion mode.
rotation
(rotation)[source]¶Set display rotation.
vline
(x, y, length, color)[source]¶Draw vertical line at the given location and color.
hline
(x, y, length, color)[source]¶Draw horizontal line at the given location and color.
pixel
(x, y, color)[source]¶Draw a pixel at the given location and color.
blit_buffer
(buffer, x, y, width, height)[source]¶Copy buffer to display at the given location.
rect
(x, y, w, h, color)[source]¶Draw a rectangle at the given location, size and color.
fill_rect
(x, y, width, height, color)[source]¶Draw a rectangle at the given location, size and filled with color.
fill
(color)[source]¶Fill the entire FrameBuffer with the specified color.
line
(x0, y0, x1, y1, color)[source]¶Draw a single pixel wide line starting at x0, y0 and ending at x1, y1.
vscrdef
(tfa, vsa, bfa)[source]¶Set Vertical Scrolling Definition.
To scroll a 135x240 display these values should be 40, 240, 40. There are 40 lines above the display that are not shown followed by @@ -441,8 +444,8 @@ changing the TFA, VSA and BFA values.
vscsad
(vssa)[source]¶Set Vertical Scroll Start Address of RAM.
Defines which line in the Frame Memory will be written as the first line after the last line of the Top Fixed Area on the display
@@ -460,8 +463,8 @@ utime.sleep(0.01)text
(font, text, x0, y0, color=micropython.const, background=micropython.const)[source]¶Draw text on display in specified font and colors. 8 and 16 bit wide fonts are supported.
bitmap
(bitmap, x, y, index=0)[source]¶Draw a bitmap on display at the specified column and row
write
(font, string, x, y, fg=micropython.const, bg=micropython.const)[source]¶Write a string using a converted true-type font on the display starting at the specified column and row
write_width
(font, string)[source]¶Returns the width in pixels of the string if it was written with the specified font