49 blending_mode_ = mode;
68 return inputs_.back();
74 return inputs_.back();
79 inputs_.emplace_back(
input,
input->extents(), dx, dy);
80 return inputs_.back();
88 return inputs_.back();
98 if (inputs_.empty())
return Box(0, 0, -1, -1);
100 for (
size_t i = 1;
i < inputs_.size();
i++) {
123 std::vector<Input> inputs_;
Axis-aligned integer rectangle.
static Box Extent(const Box &a, const Box &b)
Return the smallest box that contains both input boxes.
static Box Intersect(const Box &a, const Box &b)
Return the intersection of two boxes (may be empty).
ARGB8888 color stored as a 32-bit unsigned integer.
Multi-layer stack of rasterizables composited in order.
RasterizableStack(const Box &extents)
Create a stack with the given extents.
Box extents() const override
Return the overall extents of the stack.
Input & addInput(const Rasterizable *input, Box clip_box)
Add an input clipped to clip_box.
Input & addInput(const Rasterizable *input)
Add an input using its full extents.
void readColors(const int16_t *x, const int16_t *y, uint32_t count, Color *result) const override
Read colors for the given points.
void setAnchorExtents(const Box &anchor_extents)
Set anchor extents used for alignment.
Input & addInput(const Rasterizable *input, uint16_t dx, uint16_t dy)
Add an input with an offset.
Box anchorExtents() const override
Return the bounds used for alignment.
Input & addInput(const Rasterizable *input, Box clip_box, uint16_t dx, uint16_t dy)
Add an input with an offset and clip box.
bool readColorRect(int16_t xMin, int16_t yMin, int16_t xMax, int16_t yMax, Color *result) const override
Read colors for a rectangle.
Box naturalExtents()
Return minimal extents that fit all inputs without clipping.
void setExtents(const Box &extents)
Set the stack extents.
Drawable that can provide a color for any point within its extents.
Defines 140 opaque HTML named colors.
BlendingMode
Porter-Duff style blending modes.
@ kSourceOver
Source is placed (alpha-blended) over the destination. This is the default blending mode.