소스 검색

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

pull/4387/head
Jojaby 1 년 전
committed by GitHub
부모
커밋
c9c830cb97
No known key found for this signature in database GPG 키 ID: B5690EEEBB952194
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. +2
    -2
      src/rshapes.c

+ 2
- 2
src/rshapes.c 파일 보기

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

불러오는 중...
취소
저장