From 9f03d7c426239fb6065cff76852caa417edff00f Mon Sep 17 00:00:00 2001 From: sir-irk Date: Sun, 13 Jul 2025 23:02:02 -0500 Subject: [PATCH] fixing comments --- src/rtextures.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/rtextures.c b/src/rtextures.c index a153bb318..72ad68c40 100644 --- a/src/rtextures.c +++ b/src/rtextures.c @@ -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