AbstractPainterColor
touchgfx/widgets/canvas/AbstractPainterColor.hpp
An abstract class for creating painter classes for drawing canvas widgets. All canvas widgets need a painter to fill the shape drawn with a CanvasWidgetRenderer. The painter must provide the color of a pixel on a given coordinate, which will the be blended into the framebuffer depending on the position of the canvas widget and the transparency of the given pixel.
The AbstractPainter also implements a function which will blend each pixel in a scanline snippet into the framebuffer, but for better performance, the function should be reimplemented in each painter.
Inherited by: PainterABGR2222, PainterARGB2222, PainterARGB8888, PainterBGRA2222, PainterBW, PainterGRAY2, PainterGRAY4, PainterRGB565, PainterRGB888, PainterRGBA2222, PainterXRGB8888
Public Functions
AbstractPainterColor(colortype color =0) | |
Constructor. | |
colortype | getColor() const |
Gets the current color. | |
virtual void | setColor(colortype color) |
Sets color to use when drawing the CanvasWidget. | |
virtual | ~AbstractPainterColor() |
Destructor. | |
Protected Attributes
colortype | painterColor |
The color. | |
Public Functions Documentation
AbstractPainterColor
AbstractPainterColor | ( | colortype | color =0 | ) | |
Constructor.
color | (Optional) The color to use in the painter. |
getColor
colortype getColor | ( | ) | const |
Gets the current color.
The color.
setColor
Sets color to use when drawing the CanvasWidget.
color | The color. |
Reimplemented by: touchgfx::PainterABGR2222::setColor, touchgfx::PainterARGB2222::setColor, touchgfx::PainterARGB8888::setColor, touchgfx::PainterBGRA2222::setColor, touchgfx::PainterBW::setColor, touchgfx::PainterGRAY2::setColor, touchgfx::PainterGRAY4::setColor, touchgfx::PainterRGB565::setColor, touchgfx::PainterRGB888::setColor, touchgfx::PainterRGBA2222::setColor, touchgfx::PainterXRGB8888::setColor
~AbstractPainterColor
virtual ~AbstractPainterColor | ( | ) |
Destructor.
Protected Attributes Documentation
painterColor
colortype painterColor
The color.