roo_display
API Documentation for roo_display
Loading...
Searching...
No Matches
roo_display::StreamableStack Class Reference

Multi-layer stack of streamables composited in order. More...

#include <streamable_stack.h>

Inheritance diagram for roo_display::StreamableStack:
[legend]
Collaboration diagram for roo_display::StreamableStack:
[legend]

Data Structures

class  Input
 An input layer in the stack. More...
 

Public Member Functions

 StreamableStack (const Box &extents)
 Create a stack with the given extents.
 
InputaddInput (const Streamable *input)
 Add an input using its full extents.
 
InputaddInput (const Streamable *input, Box clip_box)
 Add an input clipped to clip_box.
 
InputaddInput (const Streamable *input, uint16_t dx, uint16_t dy)
 Add an input with an offset.
 
InputaddInput (const Streamable *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.
 
std::unique_ptr< PixelStreamcreateStream () const override
 Create a stream for the full stack.
 
std::unique_ptr< PixelStreamcreateStream (const Box &clip_box) const override
 Create a stream for a clipped box.
 
void setExtents (const Box &extents)
 Set the stack extents.
 
void setAnchorExtents (const Box &anchor_extents)
 Set anchor extents used for alignment.
 
- 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 DrawableEmpty ()
 A singleton representing a no-op drawable with no bounding box.
 

Detailed Description

Multi-layer stack of streamables composited in order.

Definition at line 12 of file streamable_stack.h.

Constructor & Destructor Documentation

◆ StreamableStack()

roo_display::StreamableStack::StreamableStack ( const Box extents)
inline

Create a stack with the given extents.

Definition at line 64 of file streamable_stack.h.

Member Function Documentation

◆ addInput() [1/4]

Input & roo_display::StreamableStack::addInput ( const Streamable input)
inline

Add an input using its full extents.

Definition at line 68 of file streamable_stack.h.

◆ addInput() [2/4]

Input & roo_display::StreamableStack::addInput ( const Streamable input,
Box  clip_box 
)
inline

Add an input clipped to clip_box.

Definition at line 74 of file streamable_stack.h.

References roo_display::Box::Intersect().

◆ addInput() [3/4]

Input & roo_display::StreamableStack::addInput ( const Streamable input,
Box  clip_box,
uint16_t  dx,
uint16_t  dy 
)
inline

Add an input with an offset and clip box.

Definition at line 86 of file streamable_stack.h.

References roo_display::Box::Intersect().

◆ addInput() [4/4]

Input & roo_display::StreamableStack::addInput ( const Streamable input,
uint16_t  dx,
uint16_t  dy 
)
inline

Add an input with an offset.

Definition at line 80 of file streamable_stack.h.

◆ anchorExtents()

Box roo_display::StreamableStack::anchorExtents ( ) const
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 96 of file streamable_stack.h.

◆ createStream() [1/2]

std::unique_ptr< PixelStream > roo_display::StreamableStack::createStream ( ) const
overridevirtual

Create a stream for the full stack.

Implements roo_display::Streamable.

Definition at line 759 of file streamable_stack.cpp.

References roo_display::Box::area(), extents(), and roo_display::Box::Intersect().

◆ createStream() [2/2]

std::unique_ptr< PixelStream > roo_display::StreamableStack::createStream ( const Box clip_box) const
overridevirtual

Create a stream for a clipped box.

Implements roo_display::Streamable.

Definition at line 780 of file streamable_stack.cpp.

References roo_display::Box::area(), extents(), and roo_display::Box::Intersect().

◆ extents()

Box roo_display::StreamableStack::extents ( ) const
inlineoverridevirtual

Return the overall extents of the stack.

Implements roo_display::Drawable.

Definition at line 94 of file streamable_stack.h.

Referenced by createStream(), createStream(), naturalExtents(), and setExtents().

◆ naturalExtents()

Box roo_display::StreamableStack::naturalExtents ( )
inline

Return minimal extents that fit all inputs without clipping.

Definition at line 99 of file streamable_stack.h.

References roo_display::Box::Extent(), and extents().

◆ setAnchorExtents()

void roo_display::StreamableStack::setAnchorExtents ( const Box anchor_extents)
inline

Set anchor extents used for alignment.

Definition at line 118 of file streamable_stack.h.

◆ setExtents()

void roo_display::StreamableStack::setExtents ( const Box extents)
inline

Set the stack extents.

Definition at line 115 of file streamable_stack.h.

References extents().


The documentation for this class was generated from the following files: