How to clip the contents of a custom NSView?

Posted by Paperflyer on Stack Overflow See other posts from Stack Overflow or by Paperflyer
Published on 2010-04-27T13:00:10Z Indexed on 2010/04/27 13:03 UTC
Read the original article Hit count: 413

Filed under:
|
|
|

I have a custom NSView that displays a nice scale/ruler. I am drawing text labels that are partly outside the actual drawing area so they get clipped by the view (looks nice).

Now, I want to introduce empty side margins into the view and need to clip its content manually. How can I set up a custom clipping rectangle?

© Stack Overflow or respective owner

Related posts about cocoa

Related posts about objective-c