CGLayer resolution on iPhone with Retina display
CGLayer resolution on iPhone with Retina display
- Subject: CGLayer resolution on iPhone with Retina display
- From: Matt Neuburg <email@hidden>
- Date: Sat, 28 Aug 2010 13:22:51 -0700
- Thread-topic: CGLayer resolution on iPhone with Retina display
In my UIView's drawRect: I derive a CGLayer from the current context, draw
into it, and then draw the layer into the context (the view). This still
works on iPhone with a Retina display, but the drawing is blocky. You can
see the problem perfectly with Apple's own example code (DrawFlag) in the
CGLayer Drawing page of the Quartz 2D Programming Guide - the stars in the
flag are blocky.
I can work around the problem for a double-resolution screen by creating a
CGLayer twice the size I need, applying a doubling scale transform, drawing
as before into the CGLayer, and then drawing the CGLayer into my view's
context scaled back down again.
But I feel I shouldn't have to do this. Given that the documentation claims
that "a CGLayer has all the characteristics of the graphics context [from
which it is derived] - its resolution, colorspace, and graphics state
settings," might we call this a bug?
m.
--
matt neuburg, phd = email@hidden, http://www.tidbits.com/matt/
pantes anthropoi tou eidenai oregontai phusei
Among the 2007 MacTech Top 25, http://tinyurl.com/2rh4pf
AppleScript: the Definitive Guide, 2nd edition
http://www.tidbits.com/matt/default.html#applescriptthings
Take Control of Exploring & Customizing Snow Leopard
http://tinyurl.com/kufyy8
RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
TidBITS, Mac news and reviews since 1990, http://www.tidbits.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden