• 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
NSBox, Primary border, clipping
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: Reference Materials
  • Next by Date: NSMatrix sending a message
  • Previous by thread: A case for overlapping views?
  • Next by thread: NSMatrix sending a message
  • Index(es):
    • Date
    • Thread