• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CALayer with checkered background like Photoshop's
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: CALayer with checkered background like Photoshop's
      • From: Richard Henry <email@hidden>
References: 
 >CALayer with checkered background like Photoshop's (From: Richard Henry <email@hidden>)

  • Prev by Date: Detect/Disable Font Fallbacks in NSLayoutManager
  • Next by Date: Re: Toolbar code in separate Controller?
  • Previous by thread: Re: CALayer with checkered background like Photoshop's
  • Next by thread: Re: CALayer with checkered background like Photoshop's
  • Index(es):
    • Date
    • Thread