Re: CALayer with checkered background like Photoshop's
Re: CALayer with checkered background like Photoshop's
- Subject: Re: CALayer with checkered background like Photoshop's
- From: Jens Alfke <email@hidden>
- Date: Tue, 15 Jul 2008 10:55:20 -0700
On 15 Jul '08, at 9:19 AM, Richard Henry wrote:
Is it possible to use a CICheckerboardGenerator filter to fill the
entire background of a CALayer so that I get a similar effect to
that which Photoshop has when the content is transparent?
I think it would be more efficient to set the layer's background
"color" to a checkered pattern. You just need to load the pattern tile
image (four squares) from a file into a CGImage (or draw it on the
fly), then wrap the CGImage in a CGPattern and make a CGColor from it.
The QuartzUtils module of my GeekGameBoard library has a
GetCGPatternNamed function to do this:
http://mooseyard.com/hg/hgwebdir.cgi/GeekGameBoard/file/tip/Source/QuartzUtils.m
—Jens
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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