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

◆ Scale()

void Scale ( int x0,
int y0,
int x1,
int y1,
int x2,
int y2,
int x3,
int y3 )

Definition at line 865 of file funky.cpp.

865 {
866 for (int y = y2; y < y3 + 1; y++) {
867 for (int x = x2; x < x3 + 1; x++) {
868 leds[XY(x, y)] = leds[XY(x0 + ((x * (x1 - x0)) / (x3 - x1)),
869 y0 + ((y * (y1 - y0)) / (y3 - y1)))];
870 }
871 }
872}
CRGB leds[NUM_LEDS]
Definition Apa102.ino:11
int y
Definition Audio.ino:72
int x
Definition Audio.ino:71
int XY(int x, int y)
Definition funky.cpp:190
uint16_t y2
Definition funky.cpp:95
uint16_t x2
Definition funky.cpp:94

References leds, x, x2, XY(), y, and y2.

Referenced by CopyTest2().

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