Problem with Nov 9 graphics code [FIXED]


Hi Jules,

Since updating to the Juce tip I found my application to look wonky. Here is a screenshot from before:

Screen Shot 2013-11-15 at 9.17.49 AM.png

and after:

Screen Shot 2013-11-15 at 9.12.26 AM.png

Text and paths are blurry, and some lines appear off by half a pixel.

I tracked down the offending commit. It is

57974a793c9808e62c389e4d30eb8b368c041ba6 — Some fixes for minor graphical problems.

I am working on Mac OS 10.8.5. 




I'm unclear about what you're doing that could be causing that..

AFAICT those changes make sense, and rendering seems totally fine in all my apps and tests - could you give me some kind of test-case code that I could use to replicate the problem?


OK, I did some more digging and found that this affects buffered Components in GL contexts.

Make one of these (100x100 is a good size):



void SampleComponent::paint(Graphics& g)
    float m = 20.5f;
    int w = getWidth();
    int h = getHeight();
    Path p;
    p.addRectangle(m, m, w - 2*m, h - 2*m);
    g.strokePath(p, PathStrokeType(1.f));    
    g.drawFittedText (String("test abcdefghij"), m, m, w - 2*m, m,
                      Justification::centred, 2, 1.0);
    g.drawFittedText (String("test abcdefghij"), m, h - m, w - 2*m, m,
                      Justification::centred, 2, 1.0);    

And draw it into a GL context. The lines and text should be blurry. 


Ah - thanks, I hadn't tried that combination. Should be fixed now!


Looks fixed, thanks for the speedy attention.