Skip to content

Commit

Permalink
REVIEWED: DrawLine() #4075
Browse files Browse the repository at this point in the history
  • Loading branch information
raysan5 committed Jun 25, 2024
1 parent ec95ee8 commit 3e441ae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/rshapes.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color colo
rlBegin(RL_LINES);
rlColor4ub(color.r, color.g, color.b, color.a);
// WARNING: Adding 0.5f offset to "center" point on selected pixel
rlVertex2f((float)startPosX + 0.5f, (float)startPosY + 0.5f);
rlVertex2f((float)endPosX + 0.5f, (float)endPosY + 0.5f);
rlVertex2f((float)startPosX, (float)startPosY);
rlVertex2f((float)endPosX, (float)endPosY);
rlEnd();
}

Expand All @@ -190,8 +190,8 @@ void DrawLineV(Vector2 startPos, Vector2 endPos, Color color)
rlBegin(RL_LINES);
rlColor4ub(color.r, color.g, color.b, color.a);
// WARNING: Adding 0.5f offset to "center" point on selected pixel
rlVertex2f(startPos.x + 0.5f, startPos.y + 0.5f);
rlVertex2f(endPos.x + 0.5f, endPos.y + 0.5f);
rlVertex2f(startPos.x, startPos.y);
rlVertex2f(endPos.x, endPos.y);
rlEnd();
}

Expand Down

2 comments on commit 3e441ae

@veins1
Copy link
Contributor

@veins1 veins1 commented on 3e441ae Jun 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose the comments about adding 0.5f should be removed @raysan5

@raysan5
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ooops!

Please sign in to comment.