gigawidgets 0.3.55
A wxWidgets-style UI library for the Arduino Giga Display Shield.
 
Loading...
Searching...
No Matches
jpeg.hpp
Go to the documentation of this file.
1
2#pragma once
3
4// Comment this out to disable JPEG support
5#define IMAGE_SUPPORT_JPEG
6
7#include "../image_file.hpp"
8
9#ifdef IMAGE_SUPPORT_JPEG
10
11namespace ui {
12
16struct Jpeg : public ImageFile {
18
19 void renderAt(const Coords &coords, const shader_t &shader = 0) const override;
20 Size getSize() const override;
21
22private:
23 size_t afterMarker(uint8_t marker, size_t startIndex = 0) const;
24};
25
26} // namespace ui
27
28#endif
shader_animated_t shader_t
A pixel shader that may or may not update based on the current time.
Definition renderable.hpp:48
A struct for storing the pixel coordinates of various UI elements.
Definition coords.hpp:17
The common interface for images read from raw data.
Definition image_file.hpp:23
ImageFile(uint8_t *const bytes, size_t length)
Constructor.
A renderable for JPEG encoded image data.
Definition jpeg.hpp:16
Size getSize() const override
Get the size of the renderable.
void renderAt(const Coords &coords, const shader_t &shader=0) const override
Display the renderable directly onto the screen.
A struct that holds the number of pixels that a widget would take up on the screen.
Definition size.hpp:17