UPM

The UPM API is a high level sensor library for IoT devices using MRAA. See examples here. Back to index page.
SparkFun sensor images provided under CC BY-NC-SA-3.0.

GFX Class

Module: st7735

This file is used by the screen.

Item Index

Methods

Properties

Methods

GFX

(
  • w
  • h
)
Number

Provided by the ili9341 module.

Creates a GFX object

Parameters:

  • w Number

    Screen width

  • h Number

    Screen height

Returns:

Number:

drawPixel

(
  • x
  • y
  • color
)

Provided by the ili9341 module.

Sends a pixel color (RGB) to the driver chip. This must be defined by the subclass (pure virtual function).

Parameters:

  • x Number

    Axis on the horizontal scale

  • y Number

    Axis on the vertical scale

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

drawLine

(
  • x0
  • y0
  • x1
  • y1
  • color
)

Provided by the ili9341 module.

Draw a line.

Parameters:

  • x0 Number

    Start of line x coordinate

  • y0 Number

    Start of line y coordinate

  • x1 Number

    End of line x coordinate

  • y1 Number

    End of line y coordinate

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

drawFastVLine

(
  • x
  • y
  • h
  • color
)

Provided by the ili9341 module.

Draws a vertical line using minimal SPI writes.

Parameters:

  • x Number

    Axis on the horizontal scale to begin line

  • y Number

    Axis on the vertical scale to begin line

  • h Number

    Height of line in pixels

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

drawFastHLine

(
  • x
  • y
  • w
  • color
)

Provided by the ili9341 module.

Draws a horizontal line using minimal SPI writes.

Parameters:

  • x Number

    Axis on the horizontal scale to begin line

  • y Number

    Axis on the vertical scale to begin line

  • w Number

    Width of line in pixels

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

drawRect

(
  • x
  • y
  • w
  • h
  • color
)

Provided by the ili9341 module.

Draws a rectangle (not filled).

Parameters:

  • x Number

    Position of upper left corner on horizontal axis

  • y Number

    Position of upper left corner on vertical axis

  • w Number

    Width of rectangle

  • h Number

    Height of rectangle RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

  • color Number

    undefined

fillRect

(
  • x
  • y
  • w
  • h
  • color
)

Provided by the ili9341 module.

Draw a filled rectangle.

Parameters:

  • x Number

    Axis on the horizontal scale of upper-left corner

  • y Number

    Axis on the vertical scale of upper-left corner

  • w Number

    Width of rectangle in pixels

  • h Number

    Height of rectangle in pixels

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

fillScreen

(
  • color
)

Provided by the ili9341 module.

Fill the screen with a single color.

Parameters:

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

invertDisplay

(
  • i
)

Provided by the ili9341 module.

Invert colors on the display.

Parameters:

  • i Boolean

    True or false to invert colors

drawCircle

(
  • x0
  • y0
  • r
  • color
)

Provided by the ili9341 module.

Draw a circle outline.

Parameters:

  • x0 Number

    Center point of circle on x-axis

  • y0 Number

    Center point of circle on y-axis

  • r Number

    Radius of circle

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

drawCircleHelper

(
  • x0
  • y0
  • r
  • cornername
  • color
)

Provided by the ili9341 module.

Used to draw rounded corners.

Parameters:

  • x0 Number

    Center point of circle on x-axis

  • y0 Number

    Center point of circle on y-axis

  • r Number

    Radius of circle

  • cornername Number

    Mask of corner number (1, 2, 4, 8)

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

fillCircle

(
  • x0
  • y0
  • r
  • color
)

Provided by the ili9341 module.

Draws a filled circle.

Parameters:

  • x0 Number

    Center point of circle on x-axis

  • y0 Number

    Center point of circle on y-axis

  • r Number

    Radius of circle

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

fillCircleHelper

(
  • x0
  • y0
  • r
  • cornername
  • delta
  • color
)

Provided by the ili9341 module.

Used to draw a filled circle and rounded rectangles.

Parameters:

  • x0 Number

    Center point of circle on x-axis

  • y0 Number

    Center point of circle on y-axis

  • r Number

    Radius of circle

  • cornername Number

    Mask of corner number (1, 2, 4, 8)

  • delta Number

    Line offset

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

drawTriangle

(
  • x0
  • y0
  • x1
  • y1
  • x2
  • y2
  • color
)

Provided by the ili9341 module.

Draw a triangle.

Parameters:

  • x0 Number

    First point coordinate on x-axis

  • y0 Number

    First point coordinate on y-axis

  • x1 Number

    Second point coordinate on x-axis

  • y1 Number

    Second point coordinate on y-axis

  • x2 Number

    Third point coordinate on x-axis

  • y2 Number

    Third point coordinate on y-axis

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

fillTriangle

(
  • x0
  • y0
  • x1
  • y1
  • x2
  • y2
  • color
)

Provided by the ili9341 module.

Draw a filled triangle.

Parameters:

  • x0 Number

    First point coordinate on x-axis

  • y0 Number

    First point coordinate on y-axis

  • x1 Number

    Second point coordinate on x-axis

  • y1 Number

    Second point coordinate on y-axis

  • x2 Number

    Third point coordinate on x-axis

  • y2 Number

    Third point coordinate on y-axis

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

drawRoundRect

(
  • x0
  • y0
  • w
  • h
  • radius
  • color
)

Provided by the ili9341 module.

Draw a rectangle with rounded corners

Parameters:

  • x0 Number

    X-axis coordinate of top-left corner

  • y0 Number

    Y-axis coordinate of top-left corner

  • w Number

    Width of rectangle

  • h Number

    height of rectangle

  • radius Number

    Radius of rounded corners

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

fillRoundRect

(
  • x0
  • y0
  • w
  • h
  • radius
  • color
)

Provided by the ili9341 module.

Draw a filled rectangle with rounded corners

Parameters:

  • x0 Number

    X-axis coordinate of top-left corner

  • y0 Number

    Y-axis coordinate of top-left corner

  • w Number

    Width of rectangle

  • h Number

    height of rectangle

  • radius Number

    Radius of rounded corners

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

drawChar

(
  • x
  • y
  • c
  • color
  • bg
  • size
)

Provided by the ili9341 module.

Draw a character at the specified point.

Parameters:

  • x Number

    X-axis coordinate of the top-left corner

  • y Number

    Y-axis coordinate of the top-left corner

  • c String

    Character to draw

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

  • bg Number

    Background color (16-bit RGB)

  • size Number

    Font size

getCursorX

() Number

Provided by the ili9341 module.

Get the x-axis coordinate of the upper-left corner of the cursor.

Returns:

Number:

X-axis coordinate of the cursor

getCursorY

() Number

Provided by the ili9341 module.

Get the y-axis coordinate of the upper-left corner of the cursor.

Returns:

Number:

Y-axis coordinate of the cursor

setCursor

(
  • x
  • y
)

Provided by the ili9341 module.

Set the cursor for writing text.

Parameters:

  • x Number

    X-axis coordinate of the top-left corner of the cursor

  • y Number

    Y-axis coordinate of the top-left corner of the cursor

setTextColor

(
  • c
)

Provided by the ili9341 module.

Set the color for text.

Parameters:

  • c Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

setTextColor

(
  • c
  • bg
)

Provided by the ili9341 module.

Set the color for text and text background (highlight).

Parameters:

  • c Number

    Text color (RGB, 16-bit)

  • bg Number

    Background text color (RGB, 16-bit)

setTextSize

(
  • s
)

Provided by the ili9341 module.

Set the size of the text.

Parameters:

  • s Number

    Font size (multiples of 8 pixel text height)

setTextWrap

(
  • w
)

Provided by the ili9341 module.

Enable or disable text wrapping.

Parameters:

  • w Boolean

    True to wrap text. False to truncate.

getRotation

() Number

Provided by the ili9341 module.

Get the current rotation configuration of the screen.

Returns:

Number:

current rotation 0-3

setRotation

(
  • r
)

Provided by the ili9341 module.

Sets the rotation of the screen. Can be overridden with another screen-specific definition.

Parameters:

  • r Number

    Rotation 0-3

cp437

(
  • x
)

Provided by the ili9341 module.

Enable (or disable) Code Page 437-compatible charset.

Parameters:

  • x Boolean

    True to enable CP437 charset. False to disable.

write

(
  • c
)

Provided by the ili9341 module.

Write a character at the current cursor position. Definition can be overridden with board-specific code.

Parameters:

  • c Number

    Character to draw

print

(
  • msg
)

Provided by the ili9341 module.

Prints a string to the screen.

Parameters:

  • msg String

    Message to print

width

() Number

Provided by the ili9341 module.

Get the current width of the screen.

Returns:

Number:

the width in pixels

height

() Number

Provided by the ili9341 module.

Get the current height of the screen.

Returns:

Number:

the height in pixels

GFX

(
  • width
  • height
)
Number

Provided by the ili9341 module.

Instantiates a GFX object

Parameters:

  • width Number

    Screen width

  • height Number

    Screen height

Returns:

Number:

drawPixel

(
  • x
  • y
  • color
)

Provided by the ili9341 module.

Sends a pixel color (RGB) to the chip. Must be implemented by the inherited class.

Parameters:

  • x Number

    Axis on the horizontal scale

  • y Number

    Axis on the vertical scale

  • color Number

    RGB value

refresh

()

Provided by the ili9341 module.

Copies the buffer to the chip via the SPI.

drawChar

(
  • x
  • y
  • data
  • color
  • bg
  • size
)

Provided by the ili9341 module.

Parameters:

  • x Number

    Axis on the horizontal scale

  • y Number

    Axis on the vertical scale

  • data Number

    Character to write

  • color Number

    Character color

  • bg Number

    Character background color

  • size Number

    Size of the font

print

(
  • msg
)

Provided by the ili9341 module.

Prints a message on the screen

Parameters:

  • msg String

    Message to print

fillScreen

(
  • color
)

Provided by the ili9341 module.

Fills the screen with a selected color

Parameters:

  • color Number

    Selected color

fillRect

(
  • x
  • y
  • w
  • h
  • color
)

Provided by the ili9341 module.

Fills a rectangle with a selected color

Parameters:

  • x Number

    Axis on the horizontal scale (top-left corner)

  • y Number

    Axis on the vertical scale (top-left corner)

  • w Number

    Distanse from x

  • h Number

    Distanse from y

  • color Number

    Selected color

drawFastVLine

(
  • x
  • y
  • h
  • color
)

Provided by the ili9341 module.

Draws a line on the vertical scale

Parameters:

  • x Number

    Axis on the horizontal scale

  • y Number

    Axis on the vertical scale

  • h Number

    Distanse from y

  • color Number

    Selected color

drawLine

(
  • x0
  • y0
  • x1
  • y1
  • color
)

Provided by the ili9341 module.

Draws a line from coordinate C0 to coordinate C1

Parameters:

  • x0 Number

    First coordinate

  • y0 Number

    First coordinate

  • x1 Number

    Second coordinate

  • y1 Number

    Second coordinate

  • color Number

    selected color

drawTriangle

(
  • x0
  • y0
  • x1
  • y1
  • x2
  • y2
  • color
)

Provided by the ili9341 module.

Draws a triangle

Parameters:

  • x0 Number

    First coordinate

  • y0 Number

    First coordinate

  • x1 Number

    Second coordinate

  • y1 Number

    Second coordinate

  • x2 Number

    Third coordinate

  • y2 Number

    Third coordinate

  • color Number

    Selected color

drawCircle

(
  • x
  • y
  • r
  • color
)

Provided by the ili9341 module.

Draws a circle

Parameters:

  • x Number

    Center of the circle on the horizontal scale

  • y Number

    Center of the circle on the vertical scale

  • r Number

    Radius of the circle

  • color Number

    Color of the circle

setCursor

(
  • x
  • y
)

Provided by the ili9341 module.

Sets the cursor for a text message

Parameters:

  • x Number

    Axis on the horizontal scale

  • y Number

    Axis on the vertical scale

setTextColor

(
  • textColor
  • textBGColor
)

Provided by the ili9341 module.

Sets a text color for a message

Parameters:

  • textColor Number

    Font color

  • textBGColor Number

    Background color

setTextSize

(
  • size
)

Provided by the ili9341 module.

Sets the size of the font

Parameters:

  • size Number

    Font size

setTextWrap

(
  • wrap
)

Provided by the ili9341 module.

Wraps a printed message

Parameters:

  • wrap Number

    True (0x1) or false (0x0)

GFX

(
  • width
  • height
  • screenBuffer
  • font
)
Number

Provided by the ili9341 module.

Instantiates a GFX object

Parameters:

  • width Number

    Screen width

  • height Number

    Screen height

  • screenBuffer Uint8_t *

    Pointer to the screen buffer

  • font String

    Pointer to the font map

Returns:

Number:

setAddrWindow

(
  • x0
  • y0
  • x1
  • y1
)

Provided by the ili9341 module.

Sets the window address

Parameters:

  • x0 Number

    First coordinate

  • y0 Number

    First coordinate

  • x1 Number

    Second coordinate

  • y1 Number

    Second coordinate

drawPixel

(
  • x
  • y
  • color
)

Provided by the ili9341 module.

Sends a pixel color (RGB) to the chip. Must be implemented by the inherited class.

Parameters:

  • x Number

    Axis on the horizontal scale

  • y Number

    Axis on the vertical scale

  • color Number

    RGB value

refresh

()

Provided by the ili9341 module.

Copies the buffer to the chip via the SPI.

drawChar

(
  • x
  • y
  • data
  • color
  • bg
  • size
)

Provided by the ili9341 module.

Parameters:

  • x Number

    Axis on the horizontal scale

  • y Number

    Axis on the vertical scale

  • data Number

    Character to write

  • color Number

    Character color

  • bg Number

    Character background color

  • size Number

    Size of the font

print

(
  • msg
)

Provided by the ili9341 module.

Prints a message on the screen

Parameters:

  • msg String

    Message to print

setPixel

(
  • x
  • y
  • color
)
Mraa::Result

Provided by the ili9341 module.

Prints a message on the screen

Parameters:

  • x Number

    Axis on the horizontal scale

  • y Number

    Axis on the vertical scale

  • color Number

    Pixel color

Returns:

Mraa::Result:

fillScreen

(
  • color
)

Provided by the ili9341 module.

Fills the screen with a selected color

Parameters:

  • color Number

    Selected color

fillRect

(
  • x
  • y
  • w
  • h
  • color
)

Provided by the ili9341 module.

Fills a rectangle with a selected color

Parameters:

  • x Number

    Axis on the horizontal scale (top-left corner)

  • y Number

    Axis on the vertical scale (top-left corner)

  • w Number

    Distanse from x

  • h Number

    Distanse from y

  • color Number

    Selected color

drawFastVLine

(
  • x
  • y
  • h
  • color
)

Provided by the ili9341 module.

Draws a line on the vertical scale

Parameters:

  • x Number

    Axis on the horizontal scale

  • y Number

    Axis on the vertical scale

  • h Number

    Distanse from y

  • color Number

    Selected color

drawLine

(
  • x0
  • y0
  • x1
  • y1
  • color
)

Provided by the ili9341 module.

Draws a line from coordinate C0 to coordinate C1

Parameters:

  • x0 Number

    First coordinate

  • y0 Number

    First coordinate

  • x1 Number

    Second coordinate

  • y1 Number

    Second coordinate

  • color Number

    selected color

drawTriangle

(
  • x0
  • y0
  • x1
  • y1
  • x2
  • y2
  • color
)

Provided by the ili9341 module.

Draws a triangle

Parameters:

  • x0 Number

    First coordinate

  • y0 Number

    First coordinate

  • x1 Number

    Second coordinate

  • y1 Number

    Second coordinate

  • x2 Number

    Third coordinate

  • y2 Number

    Third coordinate

  • color Number

    Selected color

drawCircle

(
  • x
  • y
  • r
  • color
)

Provided by the ili9341 module.

Draws a circle

Parameters:

  • x Number

    Center of the circle on the horizontal scale

  • y Number

    Center of the circle on the vertical scale

  • r Number

    Radius of the circle

  • color Number

    Color of the circle

setCursor

(
  • x
  • y
)

Provided by the ili9341 module.

Sets the cursor for a text message

Parameters:

  • x Number

    Axis on the horizontal scale

  • y Number

    Axis on the vertical scale

setTextColor

(
  • textColor
  • textBGColor
)

Provided by the ili9341 module.

Sets a text color for a message

Parameters:

  • textColor Number

    Font color

  • textBGColor Number

    Background color

setTextSize

(
  • size
)

Provided by the ili9341 module.

Sets the size of the font

Parameters:

  • size Number

    Font size

setTextWrap

(
  • wrap
)

Provided by the ili9341 module.

Wraps a printed message

Parameters:

  • wrap Number

    True (0x1) or false (0x0)

GFX

(
  • w
  • h
)
Number

Provided by the ssd1351 module.

Creates a GFX object

Parameters:

  • w Number

    Screen width

  • h Number

    Screen height

Returns:

Number:

drawPixel

(
  • x
  • y
  • color
)

Provided by the ssd1351 module.

Sends a pixel color (RGB) to the driver chip. This must be defined by the subclass (pure virtual function).

Parameters:

  • x Number

    Axis on the horizontal scale

  • y Number

    Axis on the vertical scale

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

drawLine

(
  • x0
  • y0
  • x1
  • y1
  • color
)

Provided by the ssd1351 module.

Draw a line.

Parameters:

  • x0 Number

    Start of line x coordinate

  • y0 Number

    Start of line y coordinate

  • x1 Number

    End of line x coordinate

  • y1 Number

    End of line y coordinate

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

drawFastVLine

(
  • x
  • y
  • h
  • color
)

Provided by the ssd1351 module.

Draws a vertical line using minimal SPI writes.

Parameters:

  • x Number

    Axis on the horizontal scale to begin line

  • y Number

    Axis on the vertical scale to begin line

  • h Number

    Height of line in pixels

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

drawFastHLine

(
  • x
  • y
  • w
  • color
)

Provided by the ssd1351 module.

Draws a horizontal line using minimal SPI writes.

Parameters:

  • x Number

    Axis on the horizontal scale to begin line

  • y Number

    Axis on the vertical scale to begin line

  • w Number

    Width of line in pixels

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

drawRect

(
  • x
  • y
  • w
  • h
  • color
)

Provided by the ssd1351 module.

Draws a rectangle (not filled).

Parameters:

  • x Number

    Position of upper left corner on horizontal axis

  • y Number

    Position of upper left corner on vertical axis

  • w Number

    Width of rectangle

  • h Number

    Height of rectangle RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

  • color Number

    undefined

fillRect

(
  • x
  • y
  • w
  • h
  • color
)

Provided by the ssd1351 module.

Draw a filled rectangle.

Parameters:

  • x Number

    Axis on the horizontal scale of upper-left corner

  • y Number

    Axis on the vertical scale of upper-left corner

  • w Number

    Width of rectangle in pixels

  • h Number

    Height of rectangle in pixels

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

fillScreen

(
  • color
)

Provided by the ssd1351 module.

Fill the screen with a single color.

Parameters:

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

invertDisplay

(
  • i
)

Provided by the ssd1351 module.

Invert colors on the display.

Parameters:

  • i Boolean

    True or false to invert colors

drawCircle

(
  • x0
  • y0
  • r
  • color
)

Provided by the ssd1351 module.

Draw a circle outline.

Parameters:

  • x0 Number

    Center point of circle on x-axis

  • y0 Number

    Center point of circle on y-axis

  • r Number

    Radius of circle

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

drawCircleHelper

(
  • x0
  • y0
  • r
  • cornername
  • color
)

Provided by the ssd1351 module.

Used to draw rounded corners.

Parameters:

  • x0 Number

    Center point of circle on x-axis

  • y0 Number

    Center point of circle on y-axis

  • r Number

    Radius of circle

  • cornername Number

    Mask of corner number (1, 2, 4, 8)

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

fillCircle

(
  • x0
  • y0
  • r
  • color
)

Provided by the ssd1351 module.

Draws a filled circle.

Parameters:

  • x0 Number

    Center point of circle on x-axis

  • y0 Number

    Center point of circle on y-axis

  • r Number

    Radius of circle

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

fillCircleHelper

(
  • x0
  • y0
  • r
  • cornername
  • delta
  • color
)

Provided by the ssd1351 module.

Used to draw a filled circle and rounded rectangles.

Parameters:

  • x0 Number

    Center point of circle on x-axis

  • y0 Number

    Center point of circle on y-axis

  • r Number

    Radius of circle

  • cornername Number

    Mask of corner number (1, 2, 4, 8)

  • delta Number

    Line offset

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

drawTriangle

(
  • x0
  • y0
  • x1
  • y1
  • x2
  • y2
  • color
)

Provided by the ssd1351 module.

Draw a triangle.

Parameters:

  • x0 Number

    First point coordinate on x-axis

  • y0 Number

    First point coordinate on y-axis

  • x1 Number

    Second point coordinate on x-axis

  • y1 Number

    Second point coordinate on y-axis

  • x2 Number

    Third point coordinate on x-axis

  • y2 Number

    Third point coordinate on y-axis

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

fillTriangle

(
  • x0
  • y0
  • x1
  • y1
  • x2
  • y2
  • color
)

Provided by the ssd1351 module.

Draw a filled triangle.

Parameters:

  • x0 Number

    First point coordinate on x-axis

  • y0 Number

    First point coordinate on y-axis

  • x1 Number

    Second point coordinate on x-axis

  • y1 Number

    Second point coordinate on y-axis

  • x2 Number

    Third point coordinate on x-axis

  • y2 Number

    Third point coordinate on y-axis

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

drawRoundRect

(
  • x0
  • y0
  • w
  • h
  • radius
  • color
)

Provided by the ssd1351 module.

Draw a rectangle with rounded corners

Parameters:

  • x0 Number

    X-axis coordinate of top-left corner

  • y0 Number

    Y-axis coordinate of top-left corner

  • w Number

    Width of rectangle

  • h Number

    height of rectangle

  • radius Number

    Radius of rounded corners

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

fillRoundRect

(
  • x0
  • y0
  • w
  • h
  • radius
  • color
)

Provided by the ssd1351 module.

Draw a filled rectangle with rounded corners

Parameters:

  • x0 Number

    X-axis coordinate of top-left corner

  • y0 Number

    Y-axis coordinate of top-left corner

  • w Number

    Width of rectangle

  • h Number

    height of rectangle

  • radius Number

    Radius of rounded corners

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

drawChar

(
  • x
  • y
  • c
  • color
  • bg
  • size
)

Provided by the ssd1351 module.

Draw a character at the specified point.

Parameters:

  • x Number

    X-axis coordinate of the top-left corner

  • y Number

    Y-axis coordinate of the top-left corner

  • c String

    Character to draw

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

  • bg Number

    Background color (16-bit RGB)

  • size Number

    Font size

getCursorX

() Number

Provided by the ssd1351 module.

Get the x-axis coordinate of the upper-left corner of the cursor.

Returns:

Number:

X-axis coordinate of the cursor

getCursorY

() Number

Provided by the ssd1351 module.

Get the y-axis coordinate of the upper-left corner of the cursor.

Returns:

Number:

Y-axis coordinate of the cursor

setCursor

(
  • x
  • y
)

Provided by the ssd1351 module.

Set the cursor for writing text.

Parameters:

  • x Number

    X-axis coordinate of the top-left corner of the cursor

  • y Number

    Y-axis coordinate of the top-left corner of the cursor

setTextColor

(
  • c
)

Provided by the ssd1351 module.

Set the color for text.

Parameters:

  • c Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

setTextColor

(
  • c
  • bg
)

Provided by the ssd1351 module.

Set the color for text and text background (highlight).

Parameters:

  • c Number

    Text color (RGB, 16-bit)

  • bg Number

    Background text color (RGB, 16-bit)

setTextSize

(
  • s
)

Provided by the ssd1351 module.

Set the size of the text.

Parameters:

  • s Number

    Font size (multiples of 8 pixel text height)

setTextWrap

(
  • w
)

Provided by the ssd1351 module.

Enable or disable text wrapping.

Parameters:

  • w Boolean

    True to wrap text. False to truncate.

getRotation

() Number

Provided by the ssd1351 module.

Get the current rotation configuration of the screen.

Returns:

Number:

current rotation 0-3

setRotation

(
  • r
)

Provided by the ssd1351 module.

Sets the rotation of the screen. Can be overridden with another screen-specific definition.

Parameters:

  • r Number

    Rotation 0-3

cp437

(
  • x
)

Provided by the ssd1351 module.

Enable (or disable) Code Page 437-compatible charset.

Parameters:

  • x Boolean

    True to enable CP437 charset. False to disable.

write

(
  • c
)

Provided by the ssd1351 module.

Write a character at the current cursor position. Definition can be overridden with board-specific code.

Parameters:

  • c Number

    Character to draw

print

(
  • msg
)

Provided by the ssd1351 module.

Prints a string to the screen.

Parameters:

  • msg String

    Message to print

width

() Number

Provided by the ssd1351 module.

Get the current width of the screen.

Returns:

Number:

the width in pixels

height

() Number

Provided by the ssd1351 module.

Get the current height of the screen.

Returns:

Number:

the height in pixels

GFX

(
  • width
  • height
)
Number

Provided by the ssd1351 module.

Instantiates a GFX object

Parameters:

  • width Number

    Screen width

  • height Number

    Screen height

Returns:

Number:

drawPixel

(
  • x
  • y
  • color
)

Provided by the ssd1351 module.

Sends a pixel color (RGB) to the chip. Must be implemented by the inherited class.

Parameters:

  • x Number

    Axis on the horizontal scale

  • y Number

    Axis on the vertical scale

  • color Number

    RGB value

refresh

()

Provided by the ssd1351 module.

Copies the buffer to the chip via the SPI.

drawChar

(
  • x
  • y
  • data
  • color
  • bg
  • size
)

Provided by the ssd1351 module.

Parameters:

  • x Number

    Axis on the horizontal scale

  • y Number

    Axis on the vertical scale

  • data Number

    Character to write

  • color Number

    Character color

  • bg Number

    Character background color

  • size Number

    Size of the font

print

(
  • msg
)

Provided by the ssd1351 module.

Prints a message on the screen

Parameters:

  • msg String

    Message to print

fillScreen

(
  • color
)

Provided by the ssd1351 module.

Fills the screen with a selected color

Parameters:

  • color Number

    Selected color

fillRect

(
  • x
  • y
  • w
  • h
  • color
)

Provided by the ssd1351 module.

Fills a rectangle with a selected color

Parameters:

  • x Number

    Axis on the horizontal scale (top-left corner)

  • y Number

    Axis on the vertical scale (top-left corner)

  • w Number

    Distanse from x

  • h Number

    Distanse from y

  • color Number

    Selected color

drawFastVLine

(
  • x
  • y
  • h
  • color
)

Provided by the ssd1351 module.

Draws a line on the vertical scale

Parameters:

  • x Number

    Axis on the horizontal scale

  • y Number

    Axis on the vertical scale

  • h Number

    Distanse from y

  • color Number

    Selected color

drawLine

(
  • x0
  • y0
  • x1
  • y1
  • color
)

Provided by the ssd1351 module.

Draws a line from coordinate C0 to coordinate C1

Parameters:

  • x0 Number

    First coordinate

  • y0 Number

    First coordinate

  • x1 Number

    Second coordinate

  • y1 Number

    Second coordinate

  • color Number

    selected color

drawTriangle

(
  • x0
  • y0
  • x1
  • y1
  • x2
  • y2
  • color
)

Provided by the ssd1351 module.

Draws a triangle

Parameters:

  • x0 Number

    First coordinate

  • y0 Number

    First coordinate

  • x1 Number

    Second coordinate

  • y1 Number

    Second coordinate

  • x2 Number

    Third coordinate

  • y2 Number

    Third coordinate

  • color Number

    Selected color

drawCircle

(
  • x
  • y
  • r
  • color
)

Provided by the ssd1351 module.

Draws a circle

Parameters:

  • x Number

    Center of the circle on the horizontal scale

  • y Number

    Center of the circle on the vertical scale

  • r Number

    Radius of the circle

  • color Number

    Color of the circle

setCursor

(
  • x
  • y
)

Provided by the ssd1351 module.

Sets the cursor for a text message

Parameters:

  • x Number

    Axis on the horizontal scale

  • y Number

    Axis on the vertical scale

setTextColor

(
  • textColor
  • textBGColor
)

Provided by the ssd1351 module.

Sets a text color for a message

Parameters:

  • textColor Number

    Font color

  • textBGColor Number

    Background color

setTextSize

(
  • size
)

Provided by the ssd1351 module.

Sets the size of the font

Parameters:

  • size Number

    Font size

setTextWrap

(
  • wrap
)

Provided by the ssd1351 module.

Wraps a printed message

Parameters:

  • wrap Number

    True (0x1) or false (0x0)

GFX

(
  • width
  • height
  • screenBuffer
  • font
)
Number

Provided by the ssd1351 module.

Instantiates a GFX object

Parameters:

  • width Number

    Screen width

  • height Number

    Screen height

  • screenBuffer Uint8_t *

    Pointer to the screen buffer

  • font String

    Pointer to the font map

Returns:

Number:

setAddrWindow

(
  • x0
  • y0
  • x1
  • y1
)

Provided by the ssd1351 module.

Sets the window address

Parameters:

  • x0 Number

    First coordinate

  • y0 Number

    First coordinate

  • x1 Number

    Second coordinate

  • y1 Number

    Second coordinate

drawPixel

(
  • x
  • y
  • color
)

Provided by the ssd1351 module.

Sends a pixel color (RGB) to the chip. Must be implemented by the inherited class.

Parameters:

  • x Number

    Axis on the horizontal scale

  • y Number

    Axis on the vertical scale

  • color Number

    RGB value

refresh

()

Provided by the ssd1351 module.

Copies the buffer to the chip via the SPI.

drawChar

(
  • x
  • y
  • data
  • color
  • bg
  • size
)

Provided by the ssd1351 module.

Parameters:

  • x Number

    Axis on the horizontal scale

  • y Number

    Axis on the vertical scale

  • data Number

    Character to write

  • color Number

    Character color

  • bg Number

    Character background color

  • size Number

    Size of the font

print

(
  • msg
)

Provided by the ssd1351 module.

Prints a message on the screen

Parameters:

  • msg String

    Message to print

setPixel

(
  • x
  • y
  • color
)
Mraa::Result

Provided by the ssd1351 module.

Prints a message on the screen

Parameters:

  • x Number

    Axis on the horizontal scale

  • y Number

    Axis on the vertical scale

  • color Number

    Pixel color

Returns:

Mraa::Result:

fillScreen

(
  • color
)

Provided by the ssd1351 module.

Fills the screen with a selected color

Parameters:

  • color Number

    Selected color

fillRect

(
  • x
  • y
  • w
  • h
  • color
)

Provided by the ssd1351 module.

Fills a rectangle with a selected color

Parameters:

  • x Number

    Axis on the horizontal scale (top-left corner)

  • y Number

    Axis on the vertical scale (top-left corner)

  • w Number

    Distanse from x

  • h Number

    Distanse from y

  • color Number

    Selected color

drawFastVLine

(
  • x
  • y
  • h
  • color
)

Provided by the ssd1351 module.

Draws a line on the vertical scale

Parameters:

  • x Number

    Axis on the horizontal scale

  • y Number

    Axis on the vertical scale

  • h Number

    Distanse from y

  • color Number

    Selected color

drawLine

(
  • x0
  • y0
  • x1
  • y1
  • color
)

Provided by the ssd1351 module.

Draws a line from coordinate C0 to coordinate C1

Parameters:

  • x0 Number

    First coordinate

  • y0 Number

    First coordinate

  • x1 Number

    Second coordinate

  • y1 Number

    Second coordinate

  • color Number

    selected color

drawTriangle

(
  • x0
  • y0
  • x1
  • y1
  • x2
  • y2
  • color
)

Provided by the ssd1351 module.

Draws a triangle

Parameters:

  • x0 Number

    First coordinate

  • y0 Number

    First coordinate

  • x1 Number

    Second coordinate

  • y1 Number

    Second coordinate

  • x2 Number

    Third coordinate

  • y2 Number

    Third coordinate

  • color Number

    Selected color

drawCircle

(
  • x
  • y
  • r
  • color
)

Provided by the ssd1351 module.

Draws a circle

Parameters:

  • x Number

    Center of the circle on the horizontal scale

  • y Number

    Center of the circle on the vertical scale

  • r Number

    Radius of the circle

  • color Number

    Color of the circle

setCursor

(
  • x
  • y
)

Provided by the ssd1351 module.

Sets the cursor for a text message

Parameters:

  • x Number

    Axis on the horizontal scale

  • y Number

    Axis on the vertical scale

setTextColor

(
  • textColor
  • textBGColor
)

Provided by the ssd1351 module.

Sets a text color for a message

Parameters:

  • textColor Number

    Font color

  • textBGColor Number

    Background color

setTextSize

(
  • size
)

Provided by the ssd1351 module.

Sets the size of the font

Parameters:

  • size Number

    Font size

setTextWrap

(
  • wrap
)

Provided by the ssd1351 module.

Wraps a printed message

Parameters:

  • wrap Number

    True (0x1) or false (0x0)

GFX

(
  • w
  • h
)
Number

Creates a GFX object

Parameters:

  • w Number

    Screen width

  • h Number

    Screen height

Returns:

Number:

drawPixel

(
  • x
  • y
  • color
)

Sends a pixel color (RGB) to the driver chip. This must be defined by the subclass (pure virtual function).

Parameters:

  • x Number

    Axis on the horizontal scale

  • y Number

    Axis on the vertical scale

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

drawLine

(
  • x0
  • y0
  • x1
  • y1
  • color
)

Draw a line.

Parameters:

  • x0 Number

    Start of line x coordinate

  • y0 Number

    Start of line y coordinate

  • x1 Number

    End of line x coordinate

  • y1 Number

    End of line y coordinate

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

drawFastVLine

(
  • x
  • y
  • h
  • color
)

Draws a vertical line using minimal SPI writes.

Parameters:

  • x Number

    Axis on the horizontal scale to begin line

  • y Number

    Axis on the vertical scale to begin line

  • h Number

    Height of line in pixels

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

drawFastHLine

(
  • x
  • y
  • w
  • color
)

Draws a horizontal line using minimal SPI writes.

Parameters:

  • x Number

    Axis on the horizontal scale to begin line

  • y Number

    Axis on the vertical scale to begin line

  • w Number

    Width of line in pixels

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

drawRect

(
  • x
  • y
  • w
  • h
  • color
)

Draws a rectangle (not filled).

Parameters:

  • x Number

    Position of upper left corner on horizontal axis

  • y Number

    Position of upper left corner on vertical axis

  • w Number

    Width of rectangle

  • h Number

    Height of rectangle RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

  • color Number

    undefined

fillRect

(
  • x
  • y
  • w
  • h
  • color
)

Draw a filled rectangle.

Parameters:

  • x Number

    Axis on the horizontal scale of upper-left corner

  • y Number

    Axis on the vertical scale of upper-left corner

  • w Number

    Width of rectangle in pixels

  • h Number

    Height of rectangle in pixels

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

fillScreen

(
  • color
)

Fill the screen with a single color.

Parameters:

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

invertDisplay

(
  • i
)

Invert colors on the display.

Parameters:

  • i Boolean

    True or false to invert colors

drawCircle

(
  • x0
  • y0
  • r
  • color
)

Draw a circle outline.

Parameters:

  • x0 Number

    Center point of circle on x-axis

  • y0 Number

    Center point of circle on y-axis

  • r Number

    Radius of circle

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

drawCircleHelper

(
  • x0
  • y0
  • r
  • cornername
  • color
)

Used to draw rounded corners.

Parameters:

  • x0 Number

    Center point of circle on x-axis

  • y0 Number

    Center point of circle on y-axis

  • r Number

    Radius of circle

  • cornername Number

    Mask of corner number (1, 2, 4, 8)

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

fillCircle

(
  • x0
  • y0
  • r
  • color
)

Draws a filled circle.

Parameters:

  • x0 Number

    Center point of circle on x-axis

  • y0 Number

    Center point of circle on y-axis

  • r Number

    Radius of circle

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

fillCircleHelper

(
  • x0
  • y0
  • r
  • cornername
  • delta
  • color
)

Used to draw a filled circle and rounded rectangles.

Parameters:

  • x0 Number

    Center point of circle on x-axis

  • y0 Number

    Center point of circle on y-axis

  • r Number

    Radius of circle

  • cornername Number

    Mask of corner number (1, 2, 4, 8)

  • delta Number

    Line offset

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

drawTriangle

(
  • x0
  • y0
  • x1
  • y1
  • x2
  • y2
  • color
)

Draw a triangle.

Parameters:

  • x0 Number

    First point coordinate on x-axis

  • y0 Number

    First point coordinate on y-axis

  • x1 Number

    Second point coordinate on x-axis

  • y1 Number

    Second point coordinate on y-axis

  • x2 Number

    Third point coordinate on x-axis

  • y2 Number

    Third point coordinate on y-axis

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

fillTriangle

(
  • x0
  • y0
  • x1
  • y1
  • x2
  • y2
  • color
)

Draw a filled triangle.

Parameters:

  • x0 Number

    First point coordinate on x-axis

  • y0 Number

    First point coordinate on y-axis

  • x1 Number

    Second point coordinate on x-axis

  • y1 Number

    Second point coordinate on y-axis

  • x2 Number

    Third point coordinate on x-axis

  • y2 Number

    Third point coordinate on y-axis

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

drawRoundRect

(
  • x0
  • y0
  • w
  • h
  • radius
  • color
)

Draw a rectangle with rounded corners

Parameters:

  • x0 Number

    X-axis coordinate of top-left corner

  • y0 Number

    Y-axis coordinate of top-left corner

  • w Number

    Width of rectangle

  • h Number

    height of rectangle

  • radius Number

    Radius of rounded corners

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

fillRoundRect

(
  • x0
  • y0
  • w
  • h
  • radius
  • color
)

Draw a filled rectangle with rounded corners

Parameters:

  • x0 Number

    X-axis coordinate of top-left corner

  • y0 Number

    Y-axis coordinate of top-left corner

  • w Number

    Width of rectangle

  • h Number

    height of rectangle

  • radius Number

    Radius of rounded corners

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

drawChar

(
  • x
  • y
  • c
  • color
  • bg
  • size
)

Draw a character at the specified point.

Parameters:

  • x Number

    X-axis coordinate of the top-left corner

  • y Number

    Y-axis coordinate of the top-left corner

  • c String

    Character to draw

  • color Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

  • bg Number

    Background color (16-bit RGB)

  • size Number

    Font size

getCursorX

() Number

Get the x-axis coordinate of the upper-left corner of the cursor.

Returns:

Number:

X-axis coordinate of the cursor

getCursorY

() Number

Get the y-axis coordinate of the upper-left corner of the cursor.

Returns:

Number:

Y-axis coordinate of the cursor

setCursor

(
  • x
  • y
)

Set the cursor for writing text.

Parameters:

  • x Number

    X-axis coordinate of the top-left corner of the cursor

  • y Number

    Y-axis coordinate of the top-left corner of the cursor

setTextColor

(
  • c
)

Set the color for text.

Parameters:

  • c Number

    RGB (16-bit) color (R[0-4], G[5-10], B[11-15]

setTextColor

(
  • c
  • bg
)

Set the color for text and text background (highlight).

Parameters:

  • c Number

    Text color (RGB, 16-bit)

  • bg Number

    Background text color (RGB, 16-bit)

setTextSize

(
  • s
)

Set the size of the text.

Parameters:

  • s Number

    Font size (multiples of 8 pixel text height)

setTextWrap

(
  • w
)

Enable or disable text wrapping.

Parameters:

  • w Boolean

    True to wrap text. False to truncate.

getRotation

() Number

Get the current rotation configuration of the screen.

Returns:

Number:

current rotation 0-3

setRotation

(
  • r
)

Sets the rotation of the screen. Can be overridden with another screen-specific definition.

Parameters:

  • r Number

    Rotation 0-3

cp437

(
  • x
)

Enable (or disable) Code Page 437-compatible charset.

Parameters:

  • x Boolean

    True to enable CP437 charset. False to disable.

write

(
  • c
)

Write a character at the current cursor position. Definition can be overridden with board-specific code.

Parameters:

  • c Number

    Character to draw

print

(
  • msg
)

Prints a string to the screen.

Parameters:

  • msg String

    Message to print

width

() Number

Get the current width of the screen.

Returns:

Number:

the width in pixels

height

() Number

Get the current height of the screen.

Returns:

Number:

the height in pixels

GFX

(
  • width
  • height
)
Number

Instantiates a GFX object

Parameters:

  • width Number

    Screen width

  • height Number

    Screen height

Returns:

Number:

drawPixel

(
  • x
  • y
  • color
)

Sends a pixel color (RGB) to the chip. Must be implemented by the inherited class.

Parameters:

  • x Number

    Axis on the horizontal scale

  • y Number

    Axis on the vertical scale

  • color Number

    RGB value

refresh

()

Copies the buffer to the chip via the SPI.

drawChar

(
  • x
  • y
  • data
  • color
  • bg
  • size
)

Parameters:

  • x Number

    Axis on the horizontal scale

  • y Number

    Axis on the vertical scale

  • data Number

    Character to write

  • color Number

    Character color

  • bg Number

    Character background color

  • size Number

    Size of the font

print

(
  • msg
)

Prints a message on the screen

Parameters:

  • msg String

    Message to print

fillScreen

(
  • color
)

Fills the screen with a selected color

Parameters:

  • color Number

    Selected color

fillRect

(
  • x
  • y
  • w
  • h
  • color
)

Fills a rectangle with a selected color

Parameters:

  • x Number

    Axis on the horizontal scale (top-left corner)

  • y Number

    Axis on the vertical scale (top-left corner)

  • w Number

    Distanse from x

  • h Number

    Distanse from y

  • color Number

    Selected color

drawFastVLine

(
  • x
  • y
  • h
  • color
)

Draws a line on the vertical scale

Parameters:

  • x Number

    Axis on the horizontal scale

  • y Number

    Axis on the vertical scale

  • h Number

    Distanse from y

  • color Number

    Selected color

drawLine

(
  • x0
  • y0
  • x1
  • y1
  • color
)

Draws a line from coordinate C0 to coordinate C1

Parameters:

  • x0 Number

    First coordinate

  • y0 Number

    First coordinate

  • x1 Number

    Second coordinate

  • y1 Number

    Second coordinate

  • color Number

    selected color

drawTriangle

(
  • x0
  • y0
  • x1
  • y1
  • x2
  • y2
  • color
)

Draws a triangle

Parameters:

  • x0 Number

    First coordinate

  • y0 Number

    First coordinate

  • x1 Number

    Second coordinate

  • y1 Number

    Second coordinate

  • x2 Number

    Third coordinate

  • y2 Number

    Third coordinate

  • color Number

    Selected color

drawCircle

(
  • x
  • y
  • r
  • color
)

Draws a circle

Parameters:

  • x Number

    Center of the circle on the horizontal scale

  • y Number

    Center of the circle on the vertical scale

  • r Number

    Radius of the circle

  • color Number

    Color of the circle

setCursor

(
  • x
  • y
)

Sets the cursor for a text message

Parameters:

  • x Number

    Axis on the horizontal scale

  • y Number

    Axis on the vertical scale

setTextColor

(
  • textColor
  • textBGColor
)

Sets a text color for a message

Parameters:

  • textColor Number

    Font color

  • textBGColor Number

    Background color

setTextSize

(
  • size
)

Sets the size of the font

Parameters:

  • size Number

    Font size

setTextWrap

(
  • wrap
)

Wraps a printed message

Parameters:

  • wrap Number

    True (0x1) or false (0x0)

GFX

(
  • width
  • height
  • screenBuffer
  • font
)
Number

Instantiates a GFX object

Parameters:

  • width Number

    Screen width

  • height Number

    Screen height

  • screenBuffer Uint8_t *

    Pointer to the screen buffer

  • font String

    Pointer to the font map

Returns:

Number:

setAddrWindow

(
  • x0
  • y0
  • x1
  • y1
)

Sets the window address

Parameters:

  • x0 Number

    First coordinate

  • y0 Number

    First coordinate

  • x1 Number

    Second coordinate

  • y1 Number

    Second coordinate

drawPixel

(
  • x
  • y
  • color
)

Sends a pixel color (RGB) to the chip. Must be implemented by the inherited class.

Parameters:

  • x Number

    Axis on the horizontal scale

  • y Number

    Axis on the vertical scale

  • color Number

    RGB value

refresh

()

Copies the buffer to the chip via the SPI.

drawChar

(
  • x
  • y
  • data
  • color
  • bg
  • size
)

Parameters:

  • x Number

    Axis on the horizontal scale

  • y Number

    Axis on the vertical scale

  • data Number

    Character to write

  • color Number

    Character color

  • bg Number

    Character background color

  • size Number

    Size of the font

print

(
  • msg
)

Prints a message on the screen

Parameters:

  • msg String

    Message to print

setPixel

(
  • x
  • y
  • color
)
Mraa::Result

Prints a message on the screen

Parameters:

  • x Number

    Axis on the horizontal scale

  • y Number

    Axis on the vertical scale

  • color Number

    Pixel color

Returns:

Mraa::Result:

fillScreen

(
  • color
)

Fills the screen with a selected color

Parameters:

  • color Number

    Selected color

fillRect

(
  • x
  • y
  • w
  • h
  • color
)

Fills a rectangle with a selected color

Parameters:

  • x Number

    Axis on the horizontal scale (top-left corner)

  • y Number

    Axis on the vertical scale (top-left corner)

  • w Number

    Distanse from x

  • h Number

    Distanse from y

  • color Number

    Selected color

drawFastVLine

(
  • x
  • y
  • h
  • color
)

Draws a line on the vertical scale

Parameters:

  • x Number

    Axis on the horizontal scale

  • y Number

    Axis on the vertical scale

  • h Number

    Distanse from y

  • color Number

    Selected color

drawLine

(
  • x0
  • y0
  • x1
  • y1
  • color
)

Draws a line from coordinate C0 to coordinate C1

Parameters:

  • x0 Number

    First coordinate

  • y0 Number

    First coordinate

  • x1 Number

    Second coordinate

  • y1 Number

    Second coordinate

  • color Number

    selected color

drawTriangle

(
  • x0
  • y0
  • x1
  • y1
  • x2
  • y2
  • color
)

Draws a triangle

Parameters:

  • x0 Number

    First coordinate

  • y0 Number

    First coordinate

  • x1 Number

    Second coordinate

  • y1 Number

    Second coordinate

  • x2 Number

    Third coordinate

  • y2 Number

    Third coordinate

  • color Number

    Selected color

drawCircle

(
  • x
  • y
  • r
  • color
)

Draws a circle

Parameters:

  • x Number

    Center of the circle on the horizontal scale

  • y Number

    Center of the circle on the vertical scale

  • r Number

    Radius of the circle

  • color Number

    Color of the circle

setCursor

(
  • x
  • y
)

Sets the cursor for a text message

Parameters:

  • x Number

    Axis on the horizontal scale

  • y Number

    Axis on the vertical scale

setTextColor

(
  • textColor
  • textBGColor
)

Sets a text color for a message

Parameters:

  • textColor Number

    Font color

  • textBGColor Number

    Background color

setTextSize

(
  • size
)

Sets the size of the font

Parameters:

  • size Number

    Font size

setTextWrap

(
  • wrap
)

Wraps a printed message

Parameters:

  • wrap Number

    True (0x1) or false (0x0)

Properties

m_map

Uint8_t *

Provided by the ili9341 module.

Screens buffer

m_map

Uint8_t *

Provided by the ssd1351 module.

Screens buffer

m_map

Uint8_t *

Screens buffer