depricate sPC(float, float)
the function is already removed in upstream. You can use wu_pixel() instead, which is much faster and more accurate.
This commit is contained in:
@@ -5539,7 +5539,10 @@ uint16_t mode_2DLissajous(void) { // By: Andrew Tuline
|
||||
float ylocn = float(cos8(phase/2 + i*2)) / 255.0f;
|
||||
//SEGMENT.setPixelColorXY(xlocn, ylocn, SEGMENT.color_from_palette(strip.now/100+i, false, PALETTE_SOLID_WRAP, 0)); // draw pixel with anti-aliasing
|
||||
unsigned palIndex = (256*ylocn) + phase/2 + (i* SEGMENT.speed)/64;
|
||||
SEGMENT.setPixelColorXY(xlocn, ylocn, SEGMENT.color_from_palette(palIndex, false, PALETTE_SOLID_WRAP, 0)); // draw pixel with anti-aliasing - color follows rotation
|
||||
//SEGMENT.setPixelColorXY(xlocn, ylocn, SEGMENT.color_from_palette(palIndex, false, PALETTE_SOLID_WRAP, 0)); // draw pixel with anti-aliasing - color follows rotation
|
||||
// WLEDMM wu_pixel is 50% faster, and still lokks better
|
||||
SEGMENT.wu_pixel(uint32_t(xlocn * (cols <<8)), uint32_t(ylocn * (rows <<8)),
|
||||
CRGB(SEGMENT.color_from_palette(palIndex, false, PALETTE_SOLID_WRAP, 0)));
|
||||
}
|
||||
} else
|
||||
for (int i=0; i < 256; i ++) {
|
||||
|
||||
@@ -413,6 +413,8 @@ void IRAM_ATTR_YN Segment::setPixelColorXY(int x, int y, uint32_t col) //WLEDMM:
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
// WLEDMM setPixelColorXY(float x, float y, uint32_t col, ..) is depricated. use wu_pixel(x,y,col) instead.
|
||||
// anti-aliased version of setPixelColorXY()
|
||||
void Segment::setPixelColorXY(float x, float y, uint32_t col, bool aa, bool fast) // WLEDMM some speedups due to fast int and faster sqrt16
|
||||
{
|
||||
@@ -463,6 +465,7 @@ void Segment::setPixelColorXY(float x, float y, uint32_t col, bool aa, bool fast
|
||||
setPixelColorXY(uint16_t(roundf(fX)), uint16_t(roundf(fY)), col);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// returns RGBW values of pixel
|
||||
uint32_t IRAM_ATTR_YN Segment::getPixelColorXY(int x, int y) const {
|
||||
|
||||
Reference in New Issue
Block a user