mirror of
https://github.com/raysan5/raylib.git
synced 2025-10-08 19:06:27 +00:00
Fix ImageClearBackground (#1711)
- Dividing by height instead of width results in missing parts of the image.
This commit is contained in:
@@ -2347,7 +2347,7 @@ Rectangle GetImageAlphaBorder(Image image, float threshold)
|
|||||||
// Clear image background with given color
|
// Clear image background with given color
|
||||||
void ImageClearBackground(Image *dst, Color color)
|
void ImageClearBackground(Image *dst, Color color)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < dst->width*dst->height; ++i) ImageDrawPixel(dst, i%dst->width, i/dst->height, color);
|
for (int i = 0; i < dst->width*dst->height; ++i) ImageDrawPixel(dst, i%dst->width, i/dst->width, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw pixel within an image
|
// Draw pixel within an image
|
||||||
|
Reference in New Issue
Block a user