Преглед на файлове

Fix ImageClearBackground (#1711)

- Dividing by height instead of width results in missing parts of the image.
pull/1716/head
Ergoold преди 4 години
committed by GitHub
родител
ревизия
85ef9d8f2e
No known key found for this signature in database GPG ключ ID: 4AEE18F83AFDEB23
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. +1
    -1
      src/textures.c

+ 1
- 1
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

Зареждане…
Отказ
Запис