pyfirmata_epd.epdpaint¶
- class pyfirmata_epd.epdpaint.Paint(image, width, height)[source]¶
Bases:
objectInitialize a paint class
- Parameters:
image (list[int]) – Default image buffer. Can be empty
width (int) – Width of paint screen (should be multiple of 8)
height (int) – Height of paint screen
- Clear(colored)[source]¶
clear the image
- Parameters:
colored (int) – Should the pixels be colored or not
- DrawAbsolutePixel(x, y, colored)[source]¶
this draws a pixel by absolute coordinates. this function won’t be affected by the rotate parameter.
- Parameters:
x (int) – X Location
y (int) – Y Location
colored (int) – Should the pixel be colored or not
- DrawCharAt(x, y, ascii_char, font, colored)[source]¶
this draws a charactor on the frame buffer but not refresh
- Parameters:
x (int) – X Location
y (int) – Y Location
ascii_char (chr) – ASCII char
font (sFONT) – Font for the char
colored (int) – Should the pixels be colored or not
- DrawCircle(x, y, radius, colored)[source]¶
this draws a circle
- Parameters:
x (int) – Middle X Location
y (int) – Middle Y Location
radius (int) – Radius of the circle
colored (int) – Should the pixels be colored or not
- DrawFilledCircle(x, y, radius, colored)[source]¶
this draws a filled circle
- Parameters:
x (int) – Middle X Location
y (int) – Middle Y Location
radius (int) – Radius of the circle
colored (int) – Should the pixels be colored or not
- DrawFilledRectangle(x0, y0, x1, y1, colored)[source]¶
this draws a filled rectangle
- Parameters:
x0 (int) – Start X Location
y0 (int) – Start Y Location
x1 (int) – End X Location
y1 (int) – End Y Location
colored (int) – Should the pixels be colored or not
- DrawHorizontalLine(x, y, line_width, colored)[source]¶
this draws a horizontal line on the frame buffer
- Parameters:
x (int) – X Location
y (int) – Y Location
line_width (int) – Line width
colored (int) – Should the pixels be colored or not
- DrawLine(x0, y0, x1, y1, colored)[source]¶
this draws a line on the frame buffer
- Parameters:
x0 (int) – Start X Location
y0 (int) – Start Y Location
x1 (int) – End X Location
y1 (int) – End Y Location
colored (int) – Should the pixels be colored or not
- DrawPixel(x, y, colored)[source]¶
this draws a pixel by the coordinates
- Parameters:
x (int) – X Location
y (int) – Y Location
colored (int) – Should the pixel be colored or not
- DrawRectangle(x0, y0, x1, y1, colored)[source]¶
this draws a rectangle
- Parameters:
x0 (int) – Start X Location
y0 (int) – Start Y Location
x1 (int) – End X Location
y1 (int) – End Y Location
colored (int) – Should the pixels be colored or not
- DrawStringAt(x, y, text, font, colored)[source]¶
this displays a string on the frame buffer but not refresh
- Parameters:
x (int) – X Location
y (int) – Y Location
text (str) – The whole string
font (sFONT) – Font for the text
colored (int) – Should the pixels be colored or not