浏览代码

fixing comments

pull/5042/head
sir-irk 3 个月前
父节点
当前提交
9f03d7c426
共有 1 个文件被更改,包括 7 次插入3 次删除
  1. +7
    -3
      src/rtextures.c

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

正在加载...
取消
保存