• 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: Clipping subview drawing to arbitrary path or image (iPhone)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Clipping subview drawing to arbitrary path or image (iPhone)


  • Subject: Re: Clipping subview drawing to arbitrary path or image (iPhone)
  • From: David Duncan <email@hidden>
  • Date: Sat, 16 Jan 2010 21:23:16 -0800

On Jan 15, 2010, at 5:07 PM, Rick Mann wrote:

> Hmm. I tried some experiments with your suggestion, and seemed to be getting masking with the inverse of what I specified. So I looked at the docs for the mask property, and there's this note: "iPhone OS Note: As a performance consideration, iPhone OS does not support the mask property."

I'm not certain where you see that comment, but it is incorrect (with respect to iPhone OS 3.x – the mask property did not exist on 2.x).

As for the masking operation, it multiplies the alpha from the layer's contents against the layer to be masked, so if you have a mask filled with 0.75 alpha, then the layer's contents will be multiplied against 0.75. I suppose if you expect 0.75 to pass 25% of the image through, then yes it is opposite of what you expect :).

> It's clearly doing something, but it's not clear that it's doing what I want. Oh. It's working in the simulator, I bet it won't work on the phone, and it still causes a problem: it doesn't make the masked-out areas transparent.


I tested on an iPod Touch 2nd Gen and it works fine there, but keep in mind that the masking layer needs to be in the same coordinate space as the layer masked. Simplest way to do this is to assign the masking layer's frame the value of the layer to be mask's frame.
--
David Duncan
Apple DTS Animation and Printing

_______________________________________________

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: Clipping subview drawing to arbitrary path or image (iPhone)
      • From: Rick Mann <email@hidden>
References: 
 >Clipping subview drawing to arbitrary path or image (iPhone) (From: Rick Mann <email@hidden>)
 >Re: Clipping subview drawing to arbitrary path or image (iPhone) (From: David Duncan <email@hidden>)
 >Re: Clipping subview drawing to arbitrary path or image (iPhone) (From: Rick Mann <email@hidden>)
 >Re: Clipping subview drawing to arbitrary path or image (iPhone) (From: David Duncan <email@hidden>)
 >Re: Clipping subview drawing to arbitrary path or image (iPhone) (From: Rick Mann <email@hidden>)

  • Prev by Date: How to show progress indicator for background job
  • Next by Date: Re: Accessing Variables from Multiple NIBs
  • Previous by thread: Re: Clipping subview drawing to arbitrary path or image (iPhone)
  • Next by thread: Re: Clipping subview drawing to arbitrary path or image (iPhone)
  • Index(es):
    • Date
    • Thread