Pārlūkot izejas kodu

Fix rectangle width and height check to account for squares (#4382)

pull/4387/head
Jojaby pirms 1 gada
committed by GitHub
vecāks
revīzija
c9c830cb97
Šim parakstam datu bāzē netika atrasta zināma atslēga GPG atslēgas ID: B5690EEEBB952194
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. +2
    -2
      src/rshapes.c

+ 2
- 2
src/rshapes.c Parādīt failu

@ -828,8 +828,8 @@ void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color)
{
if ((lineThick > rec.width) || (lineThick > rec.height))
{
if (rec.width > rec.height) lineThick = rec.height/2;
else if (rec.width < rec.height) lineThick = rec.width/2;
if (rec.width >= rec.height) lineThick = rec.height/2;
else if (rec.width <= rec.height) lineThick = rec.width/2;
}
// When rec = { x, y, 8.0f, 6.0f } and lineThick = 2, the following

Notiek ielāde…
Atcelt
Saglabāt