MCPcopy Create free account
hub / github.com/FastLED/FastLED / at_subpixel

Method at_subpixel

src/fl/gfx/xypath_renderer.cpp.hpp:24–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22}
23
24Tile2x2_u8 XYPathRenderer::at_subpixel(float alpha) {
25 // 1) continuous point, in “pixel‐centers” coordinates [0.5 … W–0.5]
26 if (!mDrawBoundsSet) {
27 FL_WARN("XYPathRenderer::at_subpixel: draw bounds not set");
28 return Tile2x2_u8();
29 }
30 vec2f xy = at(alpha);
31
32 // 1) shift back so whole‐pixels go 0…W–1, 0…H–1
33 xy.x -= 0.5f;
34 xy.y -= 0.5f;
35
36 return splat(xy);
37}
38
39} // namespace fl

Callers

nothing calls this directly

Calls 2

splatFunction · 0.85
Tile2x2_u8Class · 0.70

Tested by

no test coverage detected