gigawidgets 0.3.55
A wxWidgets-style UI library for the Arduino Giga Display Shield.
 
Loading...
Searching...
No Matches
ui::Bmp Struct Reference

A renderable for BMP encoded image data. More...

#include <bmp.hpp>

Inheritance diagram for ui::Bmp:
ui::ImageFile ui::Renderable

Public Member Functions

void renderAt (const Coords &coords, const shader_t &shader=0) const override
 Display the renderable directly onto the screen.
 
Size getSize () const override
 Get the size of the renderable.
 
 ImageFile (uint8_t *const bytes, size_t length)
 Constructor.
 
- Public Member Functions inherited from ui::ImageFile
 ImageFile (uint8_t *const bytes, size_t length)
 Constructor.
 

Additional Inherited Members

- Static Public Member Functions inherited from ui::ImageFile
static ImageType getType (uint8_t *const bytes, size_t length)
 Determine the image type based on the file data.
 
static bool hasSequence (uint8_t *const bytes, size_t length, const std::initializer_list< uint8_t > &&sequence, size_t index)
 Check if a buffer contains a specific sequence of bytes at the given index.
 
- Public Attributes inherited from ui::ImageFile
uint8_t *const bytes
 The buffer that the image data is stored in.
 
size_t length
 The size of the data buffer.
 
- Protected Member Functions inherited from ui::ImageFile
unsigned int getInt (size_t index, uint8_t count) const
 Read a big-endian integer from raw bytes.
 
unsigned int getIntLE (size_t index, uint8_t count) const
 Read a little-endian integer from raw bytes.
 

Detailed Description

A renderable for BMP encoded image data.

Member Function Documentation

◆ getSize()

Size ui::Bmp::getSize ( ) const
overridevirtual

Get the size of the renderable.

Returns
The size of the renderable in pixels.

Implements ui::Renderable.

◆ ImageFile()

ui::ImageFile::ImageFile ( uint8_t *const  bytes,
size_t  length 
)

Constructor.

Parameters
bytesA buffer containing the image data.
lengthThe size of the buffer.

◆ renderAt()

void ui::Bmp::renderAt ( const Coords coords,
const shader_t shader = 0 
) const
overridevirtual

Display the renderable directly onto the screen.

Parameters
coordsThe coordinates to render the first pixel [0,0] of the renderable.
shaderAn optional pixel shader to apply to each pixel of the renderable.

Implements ui::Renderable.


The documentation for this struct was generated from the following file: