DUDS
Distributed Update of Data from Something
BppGraphicDisplay.cpp
Go to the documentation of this file.
1 /*
2  * This file is part of the DUDS project. It is subject to the BSD-style
3  * license terms in the LICENSE file found in the top-level directory of this
4  * distribution and at https://github.com/jjackowski/duds/blob/master/LICENSE.
5  * No part of DUDS, including this file, may be copied, modified, propagated,
6  * or distributed except according to the terms contained in the LICENSE file.
7  *
8  * Copyright (C) 2018 Jeff Jackowski
9  */
12 #include <duds/general/Errors.hpp>
13 
14 namespace duds { namespace hardware { namespace display {
15 
17  // supplied image must match the frame buffer's size
18  if (img->dimensions() != frmbuf.dimensions()) {
22  );
23  }
24  outputFrame(img);
25 }
26 
27 } } }
const ImageDimensions & dimensions() const
Returns the dimensions of the image.
Definition: BppImage.hpp:1112
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.
The specified display size is unsupported, or there is a display size mismatch.
boost::error_info< struct Info_ImageDimensions, ImageDimensions > ImageErrorSourceDimensions
Image dimensions for a source image relevant to the error.
Definition: BppImage.hpp:298
void write(const duds::ui::graphics::BppImage *img)
Writes the new image to the display.
duds::ui::graphics::BppImage frmbuf
The frame buffer.
General errors.
#define DUDS_THROW_EXCEPTION(x)
Works like BOOST_THROW_EXCEPTION, but includes a stack trace if DUDS_ERRORS_VERBOSE is defined...
Definition: Errors.hpp:48
An image that uses a single bit to represent the state of each pixel; a black or white picture...
Definition: BppImage.hpp:321
boost::error_info< struct Info_FrameDimensions, ImageDimensions > ImageErrorTargetDimensions
Image dimensions for a target image relevant to the error.
Definition: BppImage.hpp:303