FastLED 3.9.15
Loading...
Searching...
No Matches

◆ rasterize_internal()

void fl::XYRasterU8Sparse::rasterize_internal ( const Tile2x2_u8 & tile,
const rect< u16 > * optional_bounds = nullptr )

Definition at line 48 of file raster_sparse.cpp.

49 {
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}
int y
Definition simple.h:93
int x
Definition simple.h:92
void write(const vec2< u16 > &pt, u8 value)
unsigned char u8
Definition int.h:17

References fl::Tile2x2_u8::at(), fl::rect< T >::contains(), fl::Tile2x2_u8::origin(), write(), fl::vec2< T >::x, x, fl::vec2< T >::y, and y.

Referenced by rasterize(), and rasterize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: