Strange problem with MoveTo and LineTo
Posted on 2004-11-19
This is odd. I have the following which is drawing two lines, one vertical, one horizontal:
// now draw vertical and horizontal axis
height and width are 1000. As shown above, I get no errors, and my vertical line is drawn, but the horizontal line is missing.
I have another module that follows the mouse, and draws horizontal/vertical "crosshairs" at the location, and I noticed that when my mouse rolled vertically through the Y=500 point, the horizontal line that would be drawn disappeared.
I then changed the above code to do the 2nd line like this:
and now the horizontal line is visible, albeit offset by 50 pixels from where it should be.. With the crosshair lines that follow my mouse, the horizontal line still is visible as expected, until my mouse is at exactly the center point (Y=500) at which time it disappears, until I move it just above or below it.
It's almost as if there is a 1pixel space cutting across the entire horizontal width of my device context, into which I can't draw anything.
Does anybody have any idea why this might be??