|
roo_display
API Documentation for roo_display
|
Tile with embedded interior object. More...
#include <tile.h>
Public Member Functions | |
| TileOf (DrawableType interior, Box extents, Alignment alignment, Color bgcolor=color::Background) | |
| Create a tile with embedded interior and alignment. | |
| void | drawTo (const Surface &s) const override |
| Draw this object's content, respecting the fill mode. | |
Public Member Functions inherited from roo_display::internal::TileBase | |
| TileBase (const Drawable &interior, Box extents, Alignment alignment, Color bgcolor=color::Background) | |
| void | setBgColor (Color bgcolor) |
| void | setBackground (const Rasterizable *background) |
| Box | extents () const override |
| Return the bounding box encompassing all pixels that need to be drawn. | |
Public Member Functions inherited from roo_display::Drawable | |
| virtual | ~Drawable () |
| virtual Box | anchorExtents () const |
| Return the bounds used for alignment. | |
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::internal::TileBase | |
| void | draw (const Surface &s, const Drawable &interior) const |
| void | drawInternal (const Surface &s, const Drawable &interior) const |
Tile with embedded interior object.
Useful when returning a tile without keeping a separate interior object.
|
inline |
|
inlineoverridevirtual |
Draw this object's content, respecting the fill mode.
If s.fill_mode() == FillMode::kExtents, the method must fill the entire (clipped) extents() rectangle (using s.bgcolor() for transparent parts).
The default implementation fills the clipped extents() rectangle with bgcolor and then calls drawInteriorTo(). That can cause flicker, so override this method if a better implementation is possible.
The implementation must respect surface parameters, particularly clip_box(), and must not draw outside it. The surface clip box is pre-clipped to fit within this drawable's extents().
Reimplemented from roo_display::Drawable.