|
roo_display
API Documentation for roo_display
|
Multi-layer stack of rasterizables composited in order. More...
#include <rasterizable_stack.h>
Data Structures | |
| class | Input |
| An input layer in the stack. More... | |
Public Member Functions | |
| RasterizableStack (const Box &extents) | |
| Create a stack with the given extents. | |
| Input & | addInput (const Rasterizable *input) |
| Add an input using its full extents. | |
| Input & | addInput (const Rasterizable *input, Box clip_box) |
Add an input clipped to clip_box. | |
| Input & | addInput (const Rasterizable *input, uint16_t dx, uint16_t dy) |
| Add an input with an offset. | |
| Input & | addInput (const Rasterizable *input, Box clip_box, uint16_t dx, uint16_t dy) |
| Add an input with an offset and clip box. | |
| Box | extents () const override |
| Return the overall extents of the stack. | |
| Box | anchorExtents () const override |
| Return the bounds used for alignment. | |
| Box | naturalExtents () |
| Return minimal extents that fit all inputs without clipping. | |
| void | setExtents (const Box &extents) |
| Set the stack extents. | |
| void | setAnchorExtents (const Box &anchor_extents) |
| Set anchor extents used for alignment. | |
| void | readColors (const int16_t *x, const int16_t *y, uint32_t count, Color *result) const override |
| Read colors for the given points. | |
| bool | readColorRect (int16_t xMin, int16_t yMin, int16_t xMax, int16_t yMax, Color *result) const override |
| Read colors for a rectangle. | |
Public Member Functions inherited from roo_display::Rasterizable | |
| void | readColorsMaybeOutOfBounds (const int16_t *x, const int16_t *y, uint32_t count, Color *result, Color out_of_bounds_color=color::Transparent) const |
| Read colors for points that may be out of bounds. | |
| std::unique_ptr< PixelStream > | createStream () const override |
Default createStream() using readColors(). | |
| std::unique_ptr< PixelStream > | createStream (const Box &bounds) const override |
Default createStream() for a clipped box using readColors(). | |
Public Member Functions inherited from roo_display::Streamable | |
| virtual TransparencyMode | getTransparencyMode () const |
| Return the transparency mode for pixels in this stream. | |
Public Member Functions inherited from roo_display::Drawable | |
| virtual | ~Drawable () |
Additional Inherited Members | |
Static Public Member Functions inherited from roo_display::Drawable | |
| static const Drawable * | Empty () |
| A singleton representing a no-op drawable with no bounding box. | |
Protected Member Functions inherited from roo_display::Rasterizable | |
| void | drawTo (const Surface &s) const override |
Default drawTo() using readColors(). | |
Multi-layer stack of rasterizables composited in order.
Definition at line 12 of file rasterizable_stack.h.
Create a stack with the given extents.
Definition at line 62 of file rasterizable_stack.h.
|
inline |
Add an input using its full extents.
Definition at line 66 of file rasterizable_stack.h.
|
inline |
Add an input clipped to clip_box.
Definition at line 72 of file rasterizable_stack.h.
References roo_display::Box::Intersect().
|
inline |
Add an input with an offset and clip box.
Definition at line 84 of file rasterizable_stack.h.
References roo_display::Box::Intersect().
|
inline |
Add an input with an offset.
Definition at line 78 of file rasterizable_stack.h.
|
inlineoverridevirtual |
Return the bounds used for alignment.
Defaults to extents(). Some drawables (notably text labels) may want different alignment bounds.
This method is called during a transaction and must not block or perform I/O.
Reimplemented from roo_display::Drawable.
Definition at line 94 of file rasterizable_stack.h.
|
inlineoverridevirtual |
Return the overall extents of the stack.
Implements roo_display::Drawable.
Definition at line 92 of file rasterizable_stack.h.
Referenced by naturalExtents(), and setExtents().
|
inline |
Return minimal extents that fit all inputs without clipping.
Definition at line 97 of file rasterizable_stack.h.
References roo_display::Box::Extent(), and extents().
|
overridevirtual |
Read colors for a rectangle.
Returns true if all colors are identical (then only result[0] is valid). The caller must ensure the rectangle is within bounds.
Reimplemented from roo_display::Rasterizable.
Definition at line 37 of file rasterizable_stack.cpp.
References roo_display::ApplyBlending(), roo_display::ApplyBlendingInPlace(), roo_display::ApplyBlendingSingleSourceInPlace(), roo_display::Box::contains(), roo_display::Box::empty(), roo_display::FillColor(), roo_display::Box::Intersect(), r, roo_display::Box::width(), roo_display::Box::xMax(), roo_display::Box::xMin(), roo_display::Box::yMax(), and roo_display::Box::yMin().
|
overridevirtual |
Read colors for the given points.
The caller must ensure all points are within bounds.
Implements roo_display::Rasterizable.
Definition at line 9 of file rasterizable_stack.cpp.
References roo_display::ApplyBlendingInPlaceIndexed(), roo_display::Box::contains(), roo_display::FillColor(), and r.
Set anchor extents used for alignment.
Definition at line 110 of file rasterizable_stack.h.