|
| | CartesianView (ISurface< RGB_T > &surface) |
| | Creates a Cartesian view over the provided surface.
|
| |
| void | resize (size_t newWidth, size_t newHeight) override |
| | Resizes the wrapped surface.
|
| |
| void | setPixel (size_t x, size_t y, RGB_T color) override |
| | Sets a pixel using Cartesian bottom-left coordinates.
|
| |
| RGB_T | getPixel (size_t x, size_t y) const override |
| | Returns a pixel using Cartesian bottom-left coordinates.
|
| |
| void | clear (RGB_T color=RGB_T(0)) override |
| | Clears the wrapped surface.
|
| |
| void | drawLine (size_t x0, size_t y0, size_t x1, size_t y1, RGB_T color) override |
| | Draws a line using Cartesian bottom-left coordinates.
|
| |
| void | drawRect (size_t x, size_t y, size_t w, size_t h, RGB_T color) override |
| | Draws a rectangle outline using Cartesian bottom-left coordinates.
|
| |
| void | fillRect (size_t x, size_t y, size_t w, size_t h, RGB_T color) override |
| | Fills a rectangle using Cartesian bottom-left coordinates.
|
| |
| void | drawCircle (size_t x, size_t y, size_t r, RGB_T color) override |
| | Draws a circle outline using Cartesian bottom-left coordinates.
|
| |
| void | fillCircle (size_t x, size_t y, size_t r, RGB_T color) override |
| | Fills a circle using Cartesian bottom-left coordinates.
|
| |
| void | drawSprite (size_t x, size_t y, const ISurface< RGB_T > &sprite, RGB_T invisibleColor=RGB_T(0)) override |
| | Draws a sprite with its lower-left corner anchored at the given position.
|
| |
| void | clearSprite (size_t x, size_t y, ISurface< RGB_T > &sprite, RGB_T clearColor=RGB_T(0)) override |
| | Clears the area occupied by a sprite anchored at its lower-left corner.
|
| |
| void | copySprite (size_t x, size_t y, const ISurface< RGB_T > &sprite) override |
| | Copies pixels from the view into a sprite using Cartesian coordinates.
|
| |
| size_t | width () const override |
| | Returns the wrapped surface width.
|
| |
| size_t | height () const override |
| | Returns the wrapped surface height.
|
| |
| void | drawText (int16_t x, int16_t y, const char *text, RGB565 foreground, RGB565 background=RGB565(0), bool opaque=false, uint8_t scale=1, uint8_t spacing=1, uint8_t lineSpacing=1) override |
| | Draws text with the given lower-left text box origin.
|
| |
| const uint8_t * | data () const override |
| | Returns the wrapped byte buffer.
|
| |
| size_t | size () const override |
| | Returns the wrapped buffer size in bytes.
|
| |
| ISurface< RGB_T > & | surface () |
| | Returns the wrapped surface as a reference.
|
| |
| const ISurface< RGB_T > & | surface () const |
| | Returns the wrapped surface as a const reference.
|
| |
| IFont< RGB_T > & | font () override |
| | Returns the font of the wrapped surface.
|
| |
| virtual | ~ISurface ()=default |
| | Destroys the framebuffer interface.
|
| |
| virtual bool | begin ()=0 |
| | Initializes the framebuffer surface.
|
| |
| virtual void | end ()=0 |
| | Closes the framebuffer and releases resources.
|
| |
| virtual bool | resize (size_t newWidth, size_t newHeight)=0 |
| | Resizes the framebuffer surface.
|
| |
| virtual void | setPixel (size_t x, size_t y, RGB_T color)=0 |
| | Sets a pixel at the given position.
|
| |
| virtual RGB_T | getPixel (size_t x, size_t y) const =0 |
| | Returns the pixel at the given position.
|
| |
| virtual void | scroll (int dx, int dy)=0 |
| | Scrolls the framebuffer content by the specified offsets.
|
| |
| virtual void | clear (RGB_T color=RGB_T(0))=0 |
| | Clears the framebuffer with a single color.
|
| |
| virtual void | drawLine (size_t x0, size_t y0, size_t x1, size_t y1, RGB_T color)=0 |
| | Draws a line between two points.
|
| |
| virtual void | drawRect (size_t x, size_t y, size_t w, size_t h, RGB_T color)=0 |
| | Draws a rectangle outline.
|
| |
| virtual void | fillRect (size_t x, size_t y, size_t w, size_t h, RGB_T color)=0 |
| | Fills a rectangle.
|
| |
| virtual void | drawCircle (size_t x, size_t y, size_t r, RGB_T color)=0 |
| | Draws a circle outline.
|
| |
| virtual void | fillCircle (size_t x, size_t y, size_t r, RGB_T color)=0 |
| | Fills a circle.
|
| |
| virtual void | drawSprite (size_t x, size_t y, const ISurface< RGB_T > &sprite, RGB_T invisibleColor=RGB_T(0))=0 |
| | Draws a sprite using an optional transparent color.
|
| |
| virtual void | clearSprite (size_t x, size_t y, ISurface< RGB_T > &sprite, RGB_T clearColor=RGB_T(0))=0 |
| | Clears the area covered by a sprite.
|
| |
| virtual void | copySprite (size_t x, size_t y, const ISurface< RGB_T > &sprite)=0 |
| | Copies pixels from the framebuffer into a sprite.
|
| |
| virtual size_t | width () const =0 |
| | Returns the framebuffer width in pixels.
|
| |
| virtual size_t | height () const =0 |
| | Returns the framebuffer height in pixels.
|
| |
| virtual void | drawText (int16_t x, int16_t y, const char *text, RGB_T foreground, RGB_T background=RGB_T(0), bool opaque=false, uint8_t scale=1, uint8_t spacing=1, uint8_t lineSpacing=1)=0 |
| | Draws UTF-8 text using the configured font.
|
| |
| virtual IFont< RGB_T > & | font ()=0 |
| | Returns the currently set font for text rendering.
|
| |
| virtual const uint8_t * | data () const =0 |
| | Provides access to the framebuffer as a byte buffer.
|
| |
| virtual size_t | size () const =0 |
| | Provides the total data size in bytes.
|
| |
template<typename RGB_T = RGB565>
class tinygpu::CartesianView< RGB_T >
Bottom-left Cartesian coordinate view over an existing Surface.
CartesianView wraps a Surface and remaps the logical y-axis so that (0, 0) refers to the lower-left corner while preserving the wrapped surface storage and export format.