• 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
Setting a clip mask on a NSView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Setting a clip mask on a NSView


  • Subject: Setting a clip mask on a NSView
  • From: Timothy Wall <email@hidden>
  • Date: Sat, 26 Jan 2008 16:23:51 -0500

Hi all,

Is it possible to set an arbitrary clip mask on an NSView without rewriting its drawRect? The goal is to be able to clip/obscure parts of a NSView without necessarily putting anything in front of it.

The current situation is that I have some heavyweight Java components (i.e. they have an associated native peer component) that need to be clipped by a sibling component which is *not* heavyweight (i.e. it paints into its ancestor's graphics area). On w32 and X11, native peers are windows, which can have a clip mask set so that only part of the window gets painted and/or responds to events. I'd like to do a similar thing on OSX, but the native peer is a NSView, and I don't know how to change its shape.

Thanks
T.


_______________________________________________

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: Setting a clip mask on a NSView
      • From: Jonathon Mah <email@hidden>
  • Prev by Date: Re: Making a scrolling text field.
  • Next by Date: NSViews resizeSubviewsWithOldSize is not called on resize
  • Previous by thread: Re: what does @property (readonly, retain) mean exactly ?
  • Next by thread: Re: Setting a clip mask on a NSView
  • Index(es):
    • Date
    • Thread