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

Method VisitorFill

src/fl/gfx/gradient.cpp.hpp:43–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41
42struct VisitorFill {
43 VisitorFill(span<const u8> indices, span<CRGB> output)
44 : output(output), indices(indices) {
45 // This assert was triggering on the corkscrew example. Not sure why
46 // but the corrective action of taking the min was corrective action.
47 // FASTLED_ASSERT(
48 // indices.size() == output.size(),
49 // "Gradient::fill: indices and output must be the same size"
50 // "\nSize was" << indices.size() << " and " << output.size());
51 n = fl::min(indices.size(), output.size());
52 }
53 void accept(const CRGBPalette16 *palette) {
54 for (fl::size i = 0; i < n; ++i) {
55 output[i] = ColorFromPalette(*palette, indices[i]);

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected