18 return vec2<u16>(v.x % size.x, v.y % size.y);
36 out_raster->rasterize(tiles);
49 for (
int x = 0;
x < 2; ++
x) {
50 for (
int y = 0;
y < 2; ++
y) {
75 mData[0][0] = data[0][0];
76 mData[0][1] = data[0][1];
77 mData[1][0] = data[1][0];
78 mData[1][1] = data[1][1];
114 for (
int x = 0;
x < 2; ++
x) {
115 for (
int y = 0;
y < 2; ++
y) {
145 for (u16
x = 0;
x < 2; ++
x) {
146 for (u16
y = 0;
y < 2; ++
y) {
147 const auto& data_a = a.at(
x,
y);
148 const auto& data_b = b.at(
x,
y);
155 u8 alpha_a = data_a.second;
156 u8 alpha_b = data_b.second;
159 float alpha_float = alpha_a +
t * (alpha_b - alpha_a);
160 u8 interpolated_alpha =
static_cast<u8>(alpha_float + 0.5f);
162 interpolated.
mData[
y][
x] = {
pos, interpolated_alpha};
166 result.push_back(interpolated);
Entry & at(u16 x, u16 y) FL_NO_EXCEPT
fl::pair< vec2< u16 >, u8 > Entry
Tile2x2_u8_wrap() FL_NO_EXCEPT
static vector_fixed< Tile2x2_u8_wrap, 2 > Interpolate(const Tile2x2_u8_wrap &a, const Tile2x2_u8_wrap &b, float t) FL_NO_EXCEPT
u8 & at(int x, int y) FL_NO_EXCEPT
u8 maxValue() const FL_NO_EXCEPT
Tile2x2_u8() FL_NO_EXCEPT=default
void draw(const CRGB &color, const XYMap &xymap, fl::span< CRGB > out) const FL_NO_EXCEPT
rect< u16 > bounds() const FL_NO_EXCEPT
bounds => [begin_x, end_x) (where end_x is exclusive)
static void Rasterize(const span< const Tile2x2_u8 > &tiles, XYRasterU8Sparse *output) FL_NO_EXCEPT
void scale(u8 scale) FL_NO_EXCEPT
static Tile2x2_u8 MaxTile(const Tile2x2_u8 &a, const Tile2x2_u8 &b) FL_NO_EXCEPT
Defines the 8-bit red, green, and blue (RGB) pixel type in the fl namespace.
Centralized logging categories for FastLED hardware interfaces and subsystems.
static vec2< u16 > wrap_x(const vec2< u16 > &v, const u16 width) FL_NO_EXCEPT
static vec2< u16 > wrap(const vec2< u16 > &v, const vec2< u16 > &size) FL_NO_EXCEPT
constexpr common_type_t< T, U > max(T a, U b) FL_NO_EXCEPT
u8 u8 fract8 blur_amount FL_NO_EXCEPT
constexpr int type_rank< T >::value
FL_DISABLE_WARNING_PUSH U constexpr common_type_t< T, U > min(T a, U b) FL_NO_EXCEPT
expected< T, E > result
Alias for expected (Rust-style naming)
FixedVector< T, INLINED_SIZE > vector_fixed
Base definition for an LED controller.
Representation of an 8-bit RGB pixel (Red, Green, Blue)