15 uint8_t i =
static_cast<uint8_t
>(f * 255.0f + .5f);
34 FASTLED_WARN(
"XYPathRenderer::at_subpixel: draw bounds not set");
40 float x =
xy.x - 0.5f;
41 float y =
xy.y - 0.5f;
44 int cx =
static_cast<int>(floorf(
x));
45 int cy =
static_cast<int>(floorf(
y));
52 float w_ll = (1 - fx) * (1 - fy);
53 float w_lr = fx * (1 - fy);
54 float w_ul = (1 - fx) * fy;
unsigned int xy(unsigned int x, unsigned int y)
TransformFloat & transform()
Tile2x2_u8 at_subpixel(float alpha)
TransformFloat mTransform
XYPathRenderer(XYPathGeneratorPtr path, TransformFloat transform=TransformFloat())
TransformFloat mGridTransform
vec2f compute_float(float alpha, const TransformFloat &tx)
uint8_t to_uint8(float f)
Implements a simple red square effect for 2D LED grids.