fix for XL builds

some usermod still seems to used sPC(float, float, c).

> Linking .pio/build/esp32_4MB_XL/firmware.elf
.pio/build/esp32_4MB_XL/src/usermods_list.cpp.o:(.literal._ZN7Frame3DD5Ev[Frame3D::~Frame3D()]+0x4): undefined reference to `Segment::setPixelColorXY(float, float, unsigned int, bool, bool)'
This commit is contained in:
Frank
2024-09-29 18:02:39 +02:00
parent 7e9474e78c
commit 3110b0a476

View File

@@ -413,7 +413,6 @@ 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
@@ -421,6 +420,7 @@ void Segment::setPixelColorXY(float x, float y, uint32_t col, bool aa, bool fast
if (Segment::maxHeight==1) return; // not a matrix set-up
if (x<0.0f || x>1.0f || y<0.0f || y>1.0f) return; // not normalized
#if 0 // depricated
const uint_fast16_t cols = virtualWidth();
const uint_fast16_t rows = virtualHeight();
@@ -464,8 +464,13 @@ void Segment::setPixelColorXY(float x, float y, uint32_t col, bool aa, bool fast
} else {
setPixelColorXY(uint16_t(roundf(fX)), uint16_t(roundf(fY)), col);
}
}
#else // replacement using wu_pixel
unsigned px = x * (virtualWidth() <<8);
unsigned py = y * (virtualHeight() <<8);
wu_pixel(px, py, CRGB(col));
#endif
}
// returns RGBW values of pixel
uint32_t IRAM_ATTR_YN Segment::getPixelColorXY(int x, int y) const {