Changed ImagDrawLine to be more acurate
This commit is contained in:
parent
28efddf6d4
commit
8c53e2a097
|
|
@ -3524,6 +3524,7 @@ void ImageDrawLine(Image *dst, int startPosX, int startPosY, int endPosX, int en
|
|||
if (yLonger)
|
||||
{
|
||||
// If line is more vertical, iterate over y-axis
|
||||
// Init j with 0.5 in 16-bit fixed point (1 << 15) for better rounding.
|
||||
for (int i = 0, j = (1 << 15); i != endVal; i += sgnInc, j += decInc)
|
||||
{
|
||||
// Calculate pixel position and draw it
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user