File Duplex/Canvas.lua
Functions
Canvas:__init (device) | Initialize the Canvas class |
Canvas:__tostring () | |
Canvas:check_delta (point, x, y) | If point is different from existing value, mark the canvas as changed both color, text and value are considered when doing the comparison |
Canvas:clear_delta () | After the display has finished drawing the object, this is called to clear the delta buffer and mark the canvas as unchanged |
Canvas:fill (point) | Fill/flood entire canvas with given point |
Canvas:set_size (width, height) | Call whenever the size of the parent UIComponent changes |
Canvas:write (point, x, y) | Write a single point to the canvas at the provided x/y coordinates |
CanvasPoint:__tostring () |
Functions
- Canvas:__init (device)
-
Initialize the Canvas class
Parameters:
-
device
: (Device)
-
- Canvas:__tostring ()
- Canvas:check_delta (point, x, y)
-
If point is different from existing value, mark the canvas as changed both color, text and value are considered when doing the comparison
Parameters:
-
point
: (CanvasPoint) -
x
: (Number) -
y
: (Number)
-
- Canvas:clear_delta ()
- After the display has finished drawing the object, this is called to clear the delta buffer and mark the canvas as unchanged
- Canvas:fill (point)
-
Fill/flood entire canvas with given point
Parameters:
-
point
: (CanvasPoint)
-
- Canvas:set_size (width, height)
-
Call whenever the size of the parent UIComponent changes
Parameters:
-
width
: (Number) -
height
: (Number)
-
- Canvas:write (point, x, y)
-
Write a single point to the canvas at the provided x/y coordinates
Parameters:
-
point
: (CanvasPoint) -
x
: (Number) -
y
: (Number)
-
- CanvasPoint:__tostring ()