|
DUDS
|
Distributed Update of Data from Something
|
Base class for bit-per-pixel graphic displays. More...
#include <BppGraphicDisplay.hpp>
Public Member Functions | |
| const duds::ui::graphics::ImageDimensions & | dimensions () const |
| Returns the dimensions of the frame buffer. More... | |
| const duds::ui::graphics::BppImage & | frame () const |
| Provides access to the image in the frame buffer. More... | |
| int | height () const |
| Returns the height of the frame buffer. More... | |
| int | width () const |
| Returns the width of the frame buffer. More... | |
| void | write (const duds::ui::graphics::BppImage *img) |
| Writes the new image to the display. More... | |
| void | write (const std::shared_ptr< const duds::ui::graphics::BppImage > &img) |
| Writes the new image to the display. More... | |
Protected Member Functions | |
| BppGraphicDisplay ()=default | |
| Construct with an empty frame buffer. More... | |
| BppGraphicDisplay (const duds::ui::graphics::ImageDimensions &dim) | |
| Construct with a frame buffer of the specified size. More... | |
| virtual void | outputFrame (const duds::ui::graphics::BppImage *img)=0 |
| Writes out the given image to the display and updates the image in frmbuf to match. More... | |
Protected Attributes | |
| duds::ui::graphics::BppImage | frmbuf |
| The frame buffer. More... | |
Base class for bit-per-pixel graphic displays.
Definition at line 21 of file BppGraphicDisplay.hpp.
|
protecteddefault |
Construct with an empty frame buffer.
|
inlineprotected |
Construct with a frame buffer of the specified size.
| dim | The size to make the frame buffer. |
Definition at line 45 of file BppGraphicDisplay.hpp.
|
inline |
Returns the dimensions of the frame buffer.
Definition at line 69 of file BppGraphicDisplay.hpp.
|
inline |
Provides access to the image in the frame buffer.
Definition at line 51 of file BppGraphicDisplay.hpp.
|
inline |
Returns the height of the frame buffer.
Definition at line 63 of file BppGraphicDisplay.hpp.
Referenced by duds::hardware::devices::displays::SimulatedBppDisplay::outputFrame(), and duds::hardware::devices::displays::ST7920::outputFrame().
|
protectedpure virtual |
Writes out the given image to the display and updates the image in frmbuf to match.
Called by write() after ensuring the dimensions of img and frmbuf match.
| img | The new image to show. |
Implemented in duds::hardware::devices::displays::ST7920, and duds::hardware::devices::displays::SimulatedBppDisplay.
Referenced by write().
|
inline |
Returns the width of the frame buffer.
Definition at line 57 of file BppGraphicDisplay.hpp.
Referenced by duds::hardware::devices::displays::SimulatedBppDisplay::outputFrame(), and duds::hardware::devices::displays::ST7920::outputFrame().
| void duds::hardware::display::BppGraphicDisplay::write | ( | const duds::ui::graphics::BppImage * | img | ) |
Writes the new image to the display.
| img | The new image to show on the display. |
| DisplaySizeError | The dimensions of the supplied image do not match the frame buffer's dimensions. |
Definition at line 16 of file BppGraphicDisplay.cpp.
Referenced by dimensions(), and write().
|
inline |
Writes the new image to the display.
| img | The new image to show on the display. |
| DisplaySizeError | The dimensions of the supplied image do not match the frame buffer's dimensions. |
Definition at line 89 of file BppGraphicDisplay.hpp.
|
protected |
The frame buffer.
Definition at line 26 of file BppGraphicDisplay.hpp.
Referenced by duds::hardware::devices::displays::SimulatedBppDisplay::configure(), duds::hardware::devices::displays::ST7920::configure(), frame(), duds::hardware::devices::displays::ST7920::initialize(), duds::hardware::devices::displays::ST7920::outputFrame(), and write().