You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When rendering objects, Agg rasterizes them into scan line objects (an
x/y point, horizontal length, and colour), and the renderer class writes
those to the pixels in the final buffer. Though we have determined that
Agg buffers cannot be larger than 2**16, the scan line classes that we
use contain 16-bit _signed_ integers internally, cutting off positive
values at half the maximum.
Since the renderer uses 32-bit integers, this can cause odd behaviour
where any horizontal span that _starts_ before 2**15 (such as a
horizontal spine) is rendered correctly even if it cross that point,
but those that start after (such as a vertical spine or any portion of
an angled line) end up clipped. For example, see how the spines and
lines break in #28893.
A similar problem occurs for resampled images, which also uses Agg
scanlines internally. See the breakage in #26368 for an example. The
example in that issue also contains horizontal spines that are wider
than 2**15, which also exhibit strange behaviour.
By moving to 32-bit scan lines, positions and lengths of the lines will
no longer be clipped, and this fixes rendering on very large figures.
Fixes#23826Fixes#26368Fixes#28893
0 commit comments