Bug 16721: Analysing why rectangle is not drawn in Cairo graphics #47
Labels
Graphics
Issues related to graphics
needs analysis
Track down the cause of the bug, or identify as not a bug
needs reprex
Write a minimal reproducible example that demonstrates the bug
SIP 2024
Items reserved for R Dev Day @ SIP 2024
As described in Bug 16721, when drawing multiple thin rectangles to create an image, one (or more?) of the rectangles is not drawn, creating a white stripe:
This only affects cairo raster devices. A hypothesis from @pmur002 is that the width of the rectangles is smaller than a pixel, so if a rectangle lies exactly on the border of two pixels with less than half a pixel on each side, nothing is drawn in those pixels.
This is currently difficult to debug as the white stripe occurs a long way through a loop where the 300 rectangles are drawn. Also it is difficult to relate the rectangles to pixels as the image does not fill the device due to axes etc.
So there are two main things that would be useful here:
Some starter code for the first challenge
For the second challenge, print debugging may be helpful
The text was updated successfully, but these errors were encountered: