-
Bug
-
Resolution: Fixed
-
P4
-
1.3.0
-
None
-
beta
-
x86
-
windows_nt
Date: Fri, 19 Nov 1999 18:12:55 -0800 (PST)
From: Jim Graham <###@###.###>
Subject: awt_Graphics.cpp
To: ###@###.###
MIME-Version: 1.0
Content-MD5: DxBApaXX2U8lSm2WeGoQ4w==
The following (new for Kestrel) code in DrawLine looks fishy:
} else {
SetPenColor(TRUE);
VERIFY(::MoveToEx(hDC, nX1, nY1, NULL));
VERIFY(::LineTo(hDC, nX2 + 1, nY2 + 1));
}
Shouldn't that be LineTo(nX2,nY2) followed by LineTo(nX2+1,nY2[+1])?
I think someone looked at those two calls in a row and decided that
they could be combined into one call to LineTo, but they can't because
combining them changes the slope. The second call is simply to specify
a very short line that moves off of the final pixel to work around
GDI's silly "we don't draw the last pixel" crap.
I think the code used to say "X2+1,Y2+1" for the second call to LineTo
even though "X2+1,Y2" is enough (you just need a line that moves you to
a different coordinate - any adjacent coordinate...)
...jim
From: Jim Graham <###@###.###>
Subject: awt_Graphics.cpp
To: ###@###.###
MIME-Version: 1.0
Content-MD5: DxBApaXX2U8lSm2WeGoQ4w==
The following (new for Kestrel) code in DrawLine looks fishy:
} else {
SetPenColor(TRUE);
VERIFY(::MoveToEx(hDC, nX1, nY1, NULL));
VERIFY(::LineTo(hDC, nX2 + 1, nY2 + 1));
}
Shouldn't that be LineTo(nX2,nY2) followed by LineTo(nX2+1,nY2[+1])?
I think someone looked at those two calls in a row and decided that
they could be combined into one call to LineTo, but they can't because
combining them changes the slope. The second call is simply to specify
a very short line that moves off of the final pixel to work around
GDI's silly "we don't draw the last pixel" crap.
I think the code used to say "X2+1,Y2+1" for the second call to LineTo
even though "X2+1,Y2" is enough (you just need a line that moves you to
a different coordinate - any adjacent coordinate...)
...jim