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

Method scale

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

Source from the content-addressed store, hash-verified

41}
42
43void Tile2x2_u8::scale(u8 scale) {
44 // scale the tile
45 if (scale == 255) {
46 return;
47 }
48 for (int x = 0; x < 2; ++x) {
49 for (int y = 0; y < 2; ++y) {
50 u16 value = at(x, y);
51 at(x, y) = (value * scale) >> 8;
52 }
53 }
54}
55
56Tile2x2_u8_wrap::Tile2x2_u8_wrap(const Tile2x2_u8 &from, u16 width) {
57 const vec2<u16> origin = from.origin();

Callers 1

rasterizeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected