Quellcode durchsuchen

Fix ImageClearBackground (#1711)

- Dividing by height instead of width results in missing parts of the image.
pull/1716/head
Ergoold vor 4 Jahren
committed von GitHub
Ursprung
Commit
85ef9d8f2e
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden GPG-Schlüssel-ID: 4AEE18F83AFDEB23
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. +1
    -1
      src/textures.c

+ 1
- 1
src/textures.c Datei anzeigen

@ -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

Laden…
Abbrechen
Speichern