155 {
156 fl::u16 srcWidth = srcXY.
getWidth();
158 fl::u16 dstWidth = dstXY.
getWidth();
160
161 FASTLED_ASSERT(dstWidth <= srcWidth,
162 "Destination width must be <= source width");
163 FASTLED_ASSERT(dstHeight <= srcHeight,
164 "Destination height must be <= source height");
165 const bool destination_is_half_of_source =
166 (dstWidth * 2 == srcWidth) && (dstHeight * 2 == srcHeight);
167
168
169 if (destination_is_half_of_source) {
172 if (both_rectangles) {
173
174
176 } else {
177
179 }
180 return;
181 }
182
184}
XyMapType getType() const
void downscaleArbitrary(const CRGB *src, const XYMap &srcXY, CRGB *dst, const XYMap &dstXY)
void downscaleHalf(const CRGB *src, fl::u16 srcWidth, fl::u16 srcHeight, CRGB *dst)