touchgfx::Cell is only used within TouchGFX.
 
Symbols
loading...
Files
loading...

touchgfx::Cell struct

@struct Cell Cell.hpp touchgfx/canvas_widget_renderer/Cell.hpp A pixel cell. A pixel cell. There are no constructors defined and it was done intentionally in order to avoid extra overhead when allocating an array of cells.

Syntax

struct Cell {     int16_t x;          int16_t y;          int16_t cover;      int16_t area;       void set(int _x, int _y, int _cover, int _area)     {         setCoord(_x, _y);         setCover(_cover, _area);     }     void setCoord(int _x, int _y)     {         x = int16_t(_x);         y = int16_t(_y);     }     void setCover(int _cover, int _area)     {         cover = _cover;         area = _area;     }     void addCover(int _cover, int _area)     {         cover += _cover;         area += _area;     }     int packedCoord() const     {         return (y << 16) + x;     } };

Fields

x

No summary provided. Read more...

y

No summary provided. Read more...

cover

No summary provided. Read more...

area

No summary provided. Read more...

Methods

addCover()

@fn void addCover(int _cover, int _area) Adds a cover to a Cell. Adds a cover to a Cell. Read more...

packedCoord() const

@fn int packedCoord() const Packed coordinates of the Cell. Packed coordinates of the Cell. By packing the x coordinate and y coordinate into one int, it is possible to sort Cells using a single comparison. Read more...

set()

@fn void set(int _x, int _y, int _cover, int _area) Sets all the Cell parameters. Sets all the Cell parameters. Read more...

setCoord()

@fn void setCoord(int _x, int _y) Sets the coordinate of the Cell. Sets the coordinate of the Cell. Read more...

setCover()

@fn void setCover(int _cover, int _area) Sets the cover of area cell. Sets the cover of area cell. Read more...