fillRectList oddity macOS

fillRectList has this amazing behaviour, the ability to join adjacent blocks together (without using paths!), which also works when the whole context is scaled.

This is what it looks like when using a context scaling of 1.25

The non-scaled coordinates, are on integer values next to each other.

On the top, 3 rectangles drawn separately via fillRect
On the bottom, 3 rectangles drown via fillRectList

On Windows with the Software Renderer

Build with XCode 9.4 and JUCE 4 with CoreGraphics

And then, this is how it looks like with latest Xcode and Juce 6 and CoreGraphics
The problem, the blocks are not merged together, as you see.
What could cause the problem?
It looks like the CoreGraphics code hasn’t substantially changed?!


1 Like

It could well be that something has changed in CoreGraphics, rather than JUCE itself. Have you tried an older Xcode/macOS SDK with the latest JUCE?

Thanks, i guess that too, the probably changed from some kind of scan-line based algorithm (like juce software renderer), to something which easier to accelerate.
(I guess thats why also the internal retina scaling is always by done by integer factors, and than optional downsampled by fractional numbers)