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

Method rasterize_internal

src/fl/gfx/raster_sparse.cpp.hpp:48–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48void XYRasterU8Sparse::rasterize_internal(const Tile2x2_u8 &tile,
49 const rect<u16> *optional_bounds) {
50 const vec2<u16> &origin = tile.origin();
51 for (int x = 0; x < 2; ++x) {
52 for (int y = 0; y < 2; ++y) {
53 u8 value = tile.at(x, y);
54 if (!value) {
55 continue;
56 }
57 int xx = origin.x + x;
58 int yy = origin.y + y;
59 if (optional_bounds && !optional_bounds->contains(xx, yy)) {
60 continue;
61 }
62 write(vec2<u16>(xx, yy), value);
63 }
64 }
65}
66
67} // namespace fl
68

Callers

nothing calls this directly

Calls 3

originMethod · 0.80
atMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected