Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Setting a clip mask on a NSView



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.