NSBox, Primary border, clipping
NSBox, Primary border, clipping
- Subject: NSBox, Primary border, clipping
- From: Andy Armstrong <email@hidden>
- Date: Fri, 28 Jan 2005 22:25:50 +0000
I'm writing a map viewing application for which I'd like the map
content to appear in an NSBox with rounded corners (Primary border
type). The NSBox is contained in a window with a textured background.
I'd like the content that I'm drawing to be clipped to the rounded
rectangle border of the NSBox but by default drawing isn't clipped so
my content spills out 'under' the border that NSBox paints.
It seems that my options are to either:
* create a clipping path that matches the NSBox border and use that to
clip my drawing
* draw my own border and use the same path as the clipping path
Do I have that right? Both solutions have fairly obvious drawbacks: if
I create my own clipping path I run the risk that, for example, the
radius of NSBox's corners might change in the future leaving my
clipping path out of sync. If I draw my own border how complex is it to
recreate the shading of the NSBox border?
I'm hoping I'm completely missing something obvious :)
--
Andy Armstrong, hexten.net
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden