So following on from my old post about drawing polygons and lines, I'm still having issues with what actually gets rendered by the pixel drawing methods.
As well as the issue with lines not drawing the last point specified, I have an issue which is probably related, with polygons and rectangles not drawing the top-right pixel on any corner point. Here's an example screenshot using drawRect, but the same thing happens with drawPoly.
I know it's pretty small, but hopefully you can see that the top right corner has a small gap unlike the other three corners. When I query the colour on that point, it is returning the background colour. This is causing me no end of trouble as in my game, my player travels along the path circumscribed by the border of the polygon, testing the pixel colour to see if it has moved into open space. The problem is, I want to travel around the corner of the polygon, but it's hitting a roadblock when it sees that vacant pixel. I could manually patch it if I could identify the points it's happening on, but that's not easy to tell from just a list of points. My other option is just to overwrite every corner in my polygon after I draw it, but that's a real kludge.
Is this something we have to live with, or is there a way around it?
Thanks.