summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorErgoold <[email protected]>2021-04-07 01:02:37 +0300
committerGitHub <[email protected]>2021-04-07 00:02:37 +0200
commit85ef9d8f2edde96a261fa685bdb8d0224feb7c1e (patch)
tree721fa198586c798ae310215561fe1bed395f7198
parentb3f75b91ff6859f5c19c4b1e6b17c78b5e66530f (diff)
downloadraylib-85ef9d8f2edde96a261fa685bdb8d0224feb7c1e.tar.gz
raylib-85ef9d8f2edde96a261fa685bdb8d0224feb7c1e.zip
Fix ImageClearBackground (#1711)
- Dividing by height instead of width results in missing parts of the image.
-rw-r--r--src/textures.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/textures.c b/src/textures.c
index c8a19be1..5db786f6 100644
--- a/src/textures.c
+++ b/src/textures.c
@@ -2347,7 +2347,7 @@ Rectangle GetImageAlphaBorder(Image image, float threshold)
// Clear image background with given 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