Skip to main content

Inkplate 6FLICK MicroPython - Drawing Graphics

Inkplate 6FLICK allows you to draw different geometric shapes anywhere on its 1024 x 758 px canvas. The shapes can be filled or hollow


Drawing Shapes

Below is a example that demonstrates how to draw basic shapes in Black-White display mode.

ℹ️
If you want to use the grayscale mode, simply change the constructor value and instead of using inkplate.BLACK use a numeric value: 0-3
from inkplate6_flick import Inkplate
import time

inkplate = Inkplate(Inkplate.INKPLATE_1BIT)
inkplate.begin()
inkplate.clear_display()
inkplate.display()

inkplate.draw_pixel(100, 100, inkplate.BLACK)
inkplate.draw_rect(50, 50, 75, 75, inkplate.BLACK)
inkplate.draw_circle(200, 200, 30, inkplate.BLACK)
inkplate.fill_circle(300, 300, 30, inkplate.BLACK)
inkplate.draw_fast_hline(20, 100, 50, inkplate.BLACK)
inkplate.draw_fast_vline(100, 20, 50, inkplate.BLACK)
inkplate.draw_line(100, 100, 400, 400, inkplate.BLACK)
inkplate.draw_round_rect(100, 10, 100, 100, 10, inkplate.BLACK)
inkplate.fill_round_rect(10, 100, 100, 100, 10, inkplate.BLACK)
inkplate.draw_triangle(300, 100, 400, 150, 400, 100, inkplate.BLACK)

inkplate.display()

inkplate.draw_pixel()

Set a single pixel in the frame buffer.

Function parameters:

TypeNameDescription
NumberxX coordinate.
NumberyY coordinate.
ConstcolorColor constant (BLACK or WHITE in BW mode).

inkplate.draw_rect()

Draw an unfilled rectangle outline.

Function parameters:

TypeNameDescription
NumberxLeft X.
NumberyTop Y.
NumberwWidth in pixels.
NumberhHeight in pixels.
ConstcolorOutline color.

inkplate.draw_circle()

Draw an unfilled circle.

Function parameters:

TypeNameDescription
Numberx0Center X.
Numbery0Center Y.
NumberrRadius in pixels.
ConstcolorOutline color.

inkplate.fill_circle()

Draw a filled circle.

Function parameters:

TypeNameDescription
Numberx0Center X.
Numbery0Center Y.
NumberrRadius in pixels.
ConstcolorFill color.

inkplate.draw_fast_hline()

Draw a horizontal line quickly.

Function parameters:

TypeNameDescription
NumberxStart X.
NumberyY position.
NumberwLine width in pixels.
ConstcolorLine color.

inkplate.draw_fast_vline()

Draw a vertical line quickly.

Function parameters:

TypeNameDescription
NumberxX position.
NumberyStart Y.
NumberhLine height in pixels.
ConstcolorLine color.

inkplate.draw_line()

Draw a line from one point to another.

Function parameters:

TypeNameDescription
Numberx0Start X.
Numbery0Start Y.
Numberx1End X.
Numbery1End Y.
ConstcolorLine color.

inkplate.draw_round_rect()

Draw an unfilled rectangle with rounded corners.

Function parameters:

TypeNameDescription
NumberxLeft X.
NumberyTop Y.
NumberwWidth in pixels.
NumberhHeight in pixels.
NumberradiusCorner radius in pixels.
ConstcolorOutline color.

inkplate.fill_round_rect()

Draw a filled rectangle with rounded corners.

Function parameters:

TypeNameDescription
NumberxLeft X.
NumberyTop Y.
NumberwWidth in pixels.
NumberhHeight in pixels.
NumberradiusCorner radius in pixels.
ConstcolorFill color.

inkplate.draw_triangle()

Draw a triangle outline using three vertices.

Function parameters:

TypeNameDescription
Numberx0Vertex A X.
Numbery0Vertex A Y.
Numberx1Vertex B X.
Numbery1Vertex B Y.
Numberx2Vertex C X.
Numbery2Vertex C Y.
ConstcolorOutline color.
Inkplate 6FLICK running the example code
Simple predefined shapes.

Full examples

basic_bw.py

Draw basic black and white shapes, plus a bitmap of the Soldered logo in the middle.

basic_grayscale.py

Draw different shades of gray using grayscale mode, and display a bitmap of the Soldered logo.