4#include <initializer_list>
14#include "roo_logging.h"
40 [[
deprecated(
"Use `ColorGradient::Boundary::kExtended` instead.")]]
42 [[
deprecated(
"Use `ColorGradient::Boundary::kTruncated` instead.")]]
44 [[
deprecated(
"Use `ColorGradient::Boundary::kPeriodic` instead.")]]
65 std::vector<Node> gradient_;
71roo_logging::Stream&
operator<<(roo_logging::Stream& os,
Angular gradient based on angle around center.
void readColors(const int16_t *x, const int16_t *y, uint32_t count, Color *result) const override
Read colors for the given points.
Box extents() const override
Return the bounding box encompassing all pixels that need to be drawn.
Axis-aligned integer rectangle.
static Box MaximumBox()
Return a large sentinel box used for unbounded extents.
Multi-point gradient specification.
static constexpr Boundary EXTENDED
Color getColor(float value) const
Return the color for a given value.
Boundary
Boundary behavior outside gradient range.
TransparencyMode getTransparencyMode() const
Return the transparency mode of the gradient.
static constexpr Boundary TRUNCATED
static constexpr Boundary PERIODIC
ARGB8888 color stored as a 32-bit unsigned integer.
Linear gradient (horizontal, vertical, or skewed).
Box extents() const override
Return the bounding box encompassing all pixels that need to be drawn.
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.
Radial gradient using squared distance (faster, area-uniform).
void readColors(const int16_t *x, const int16_t *y, uint32_t count, Color *result) const override
Read colors for the given points.
Box extents() const override
Return the bounding box encompassing all pixels that need to be drawn.
Radial gradient based on distance from the center.
void readColors(const int16_t *x, const int16_t *y, uint32_t count, Color *result) const override
Read colors for the given points.
Box extents() const override
Return the bounding box encompassing all pixels that need to be drawn.
Drawable that can provide a color for any point within its extents.
Defines 140 opaque HTML named colors.
LinearGradient VerticalGradient(int16_t x0, float dx, ColorGradient gradient, Box extents=Box::MaximumBox())
Create a vertical gradient: .
TransparencyMode
Transparency information for a stream or color mode.
LinearGradient HorizontalGradient(int16_t y0, float dy, ColorGradient gradient, Box extents=Box::MaximumBox())
Create a horizontal gradient: .
roo_logging::Stream & operator<<(roo_logging::Stream &os, BlendingMode mode)
A single node in the gradient.