6static const int kMaxBufSize = 64;
16 for (
auto r = inputs_.begin();
r != inputs_.end();
r++) {
17 Box bounds =
r->extents();
19 while (offset < count) {
22 if (bounds.
contains(x[offset], y[offset])) {
40 *
result = color::Transparent;
41 Box box(xMin, yMin, xMax, yMax);
44 for (
auto r = inputs_.begin();
r != inputs_.end();
r++) {
45 Box bounds =
r->extents();
47 if (clipped.
empty()) {
56 if (
r->source()->readColorRect(
57 clipped.
xMin() -
r->dx(), clipped.
yMin() -
r->dy(),
58 clipped.
xMax() -
r->dx(), clipped.
yMax() -
r->dy(), buffer)) {
65 &
row[clipped.
xMin() - xMin], *buffer,
78 &buffer[
i], clipped.
width());
Axis-aligned integer rectangle.
int16_t width() const
Width in pixels (inclusive coordinates).
int16_t xMin() const
Minimum x (inclusive).
int16_t xMax() const
Maximum x (inclusive).
bool empty() const
Return whether the box is empty.
bool contains(int16_t x, int16_t y) const
Return whether the point (x, y) lies within the box.
int16_t yMax() const
Maximum y (inclusive).
static Box Intersect(const Box &a, const Box &b)
Return the intersection of two boxes (may be empty).
int16_t yMin() const
Minimum y (inclusive).
ARGB8888 color stored as a 32-bit unsigned integer.
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.
Defines 140 opaque HTML named colors.
void ApplyBlendingInPlace(BlendingMode mode, Color *dst, const Color *src, int16_t count)
void ApplyBlendingSingleSourceInPlace(BlendingMode mode, Color *dst, Color src, int16_t count)
void ApplyBlendingInPlaceIndexed(BlendingMode mode, Color *dst, const Color *src, int16_t count, const uint32_t *index)
Color ApplyBlending(BlendingMode mode, Color dst, Color src)
void FillColor(Color *buf, uint32_t count, Color color)
Fill an array with a single color.