16 namespace duds {
namespace hardware {
namespace devices {
namespace displays {
39 std::cout <<
"\033[" <<
height() + 2 <<
'A';
44 for (
int w =
width(); w > 0; --w) {
49 for (
int h = 0; h <
height(); ++h) {
57 for (
int w =
width(); w > 0; --w) {
78 for (
int w =
width(); w > 0; --w) {
81 std::cout <<
'*' << std::endl;
std::uintptr_t PixelBlock
The type used to hold pixel values, one bit per pixel.
boost::error_info< struct Info_ImageDimensions, ImageDimensions > ImageErrorDimensions
Image dimensions relevant to the error.
int height() const
Returns the height of the frame buffer.
const PixelBlock * bufferLine(int py) const
Returns a pointer to the start of the given line.
SimulatedBppDisplay()
Creates the object with an invalid display size.
Stores the dimensions of an image.
The specified display size is unsupported, or there is a display size mismatch.
int width() const
Returns the width of the frame buffer.
void resize(const duds::ui::graphics::ImageDimensions &newdim)
Changes the size of the image.
bool bottom
True after rendering a frame to denote output is at the bottom of the frame.
duds::ui::graphics::BppImage frmbuf
The frame buffer.
virtual void outputFrame(const duds::ui::graphics::BppImage *img)
Writes out only the changed portions of the image to the display, and updates the image in frmbuf to ...
BppGraphicDisplay()=default
Construct with an empty frame buffer.
void configure(const duds::ui::graphics::ImageDimensions &id)
Initializes the object to a usable state.
#define DUDS_THROW_EXCEPTION(x)
Works like BOOST_THROW_EXCEPTION, but includes a stack trace if DUDS_ERRORS_VERBOSE is defined...
An image that uses a single bit to represent the state of each pixel; a black or white picture...