Draws into target moved up by dy pixels, only inside the rows [clipTop, clipBottom) of target.
More...
#include <OffsetSurface.h>
|
| | OffsetSurface (tinygpu::ISurface< RGB_T > &target, int32_t dy, int32_t clipTop, int32_t clipBottom) |
| |
| void | setPixel (size_t x, size_t y, RGB_T color) override |
| |
| RGB_T | getPixel (size_t x, size_t y) const override |
| |
| bool | resizeBuffer (size_t, size_t) override |
| |
| const uint8_t * | data () const override |
| |
| size_t | size () const override |
| |
template<typename RGB_T>
class tinymd::OffsetSurface< RGB_T >
Draws into target moved up by dy pixels, only inside the rows [clipTop, clipBottom) of target.
TinyGPU's drawing primitives take unsigned coordinates, and toPx() clamps negative values to 0: a widget whose top is above the edge of the surface (e.g. scrolled up in a Container) would be drawn at y = 0 with its full height instead of partly hidden. Container draws such a widget through an OffsetSurface: the widget is moved down by dy (so all its coordinates are >= 0) and every pixel is written dy rows higher, where it belongs. Pixel by pixel (via SurfaceBase), so only used for those widgets.
◆ OffsetSurface()
| OffsetSurface |
( |
tinygpu::ISurface< RGB_T > & |
target, |
|
|
int32_t |
dy, |
|
|
int32_t |
clipTop, |
|
|
int32_t |
clipBottom |
|
) |
| |
|
inline |
◆ data()
| const uint8_t * data |
( |
| ) |
const |
|
inlineoverride |
◆ getPixel()
| RGB_T getPixel |
( |
size_t |
x, |
|
|
size_t |
y |
|
) |
| const |
|
inlineoverride |
◆ resizeBuffer()
| bool resizeBuffer |
( |
size_t |
, |
|
|
size_t |
|
|
) |
| |
|
inlineoverride |
◆ setPixel()
| void setPixel |
( |
size_t |
x, |
|
|
size_t |
y, |
|
|
RGB_T |
color |
|
) |
| |
|
inlineoverride |
◆ size()
The documentation for this class was generated from the following file: