Browse Source

fixing comments

pull/5042/head
sir-irk 1 week ago
parent
commit
9f03d7c426
1 changed files with 7 additions and 3 deletions
  1. +7
    -3
      src/rtextures.c

+ 7
- 3
src/rtextures.c View File

@ -3569,15 +3569,17 @@ void ImageDrawLineEx(Image *dst, Vector2 start, Vector2 end, int thick, Color co
if ((dx != 0) && (abs(dy/dx) < 1))
{
// Line is more horizontal
// How many additional lines to draw
int wy = thick - 1;
//Draw the main line and lower half
// Draw the main line and lower half
for (int i = 0; i <= ((wy+1)/2); i++)
{
ImageDrawLine(dst, x1, y1 + i, x2, y2 + i, color); // Draw below the main line
}
//Draw the upper half
// Draw the upper half
for (int i = 1; i <= (wy/2); i++)
{
ImageDrawLine(dst, x1, y1 - i, x2, y2 - i, color); // Draw above the main line
@ -3586,6 +3588,8 @@ void ImageDrawLineEx(Image *dst, Vector2 start, Vector2 end, int thick, Color co
else if (dy != 0)
{
// Line is more vertical or perfectly horizontal
// How many additional lines to draw
int wx = thick - 1;
//Draw the main line and right half
@ -3594,7 +3598,7 @@ void ImageDrawLineEx(Image *dst, Vector2 start, Vector2 end, int thick, Color co
ImageDrawLine(dst, x1 + i, y1, x2 + i, y2, color); // Draw right of the main line
}
//Draw the the left half
// Draw the left half
for (int i = 1; i <= (wx/2); i++)
{
ImageDrawLine(dst, x1 - i, y1, x2 - i, y2, color); // Draw left of the main line

Loading…
Cancel
Save