I need to draw a horizontal line all the way across an Image. So I’m doing this:
w = (float) img->getWidth();
The line ends one pixel before the right edge of the Image.
Looking at LowLevelGraphicsSoftwareRenderer::drawHorizontal,
I suspect that the loop that does the drawing:
while (wholeEnd > wholeStart)
dest += dstPixelStride;
should be changed so that the loop condition is:
I though that perhaps I was meant to do g.drawLine(0.0,y,w,y). However, if I do this, then the call to image.lockPixelDataReadWrite in drawHorizontal uses a width that is one pixel too large.