I am creating a basic text-based application based on iOS (iOS 5, iPad) and have a view in which I do some typographic calculations (in drawRect).
I noticed that when I use CGContextConvertRectToDeviceSpace, the result that I get on a retina device is twice as much as on a device without a retina. I understand that drawRect uses an implicit conversion that should hide any differences in the retina / non-retina, so I'm confused why I should see any difference at all.
In particular, I am trying to calculate the location in user coordinates of this CTLine in user spaces. I first use CTLineGetTypographicBounds for my line and use these values in CGContextConvertRectToDeviceSpace to get a rectangle ... but I get back twice the width and height on the retina compared to the non-retina. Is something missing?
source
share