Can anyone explain why these two scenarios would produce noticeably different results on a retina display?
A. AttributedString drawn directly to graphics context via
B. AttributedString drawn to Image (appropriately scaled) which is then drawn to the original context.
In scenario B, drawing to the Image is performed in this way:
float scale = g.getInternalContext().getPhysicalPixelScaleFactor(); m_textImage = Image(Image::ARGB, r.getWidth() * scale, r.getHeight() * scale, true); Graphics textGraphics(m_textImage); textGraphics.addTransform(AffineTransform::scale(scale, scale)); text.draw(textGraphics, r);
Scenario B produces noticeably more jagged edges, but the difference is more subtle than just drawing a non-retina image.