Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void)drawRect:(NSRect)dirtyRect
- {
- NSGraphicsContext *ctx = [NSGraphicsContext currentContext];
- [ctx saveGraphicsState];
- NSBezierPath *clipPath = [NSBezierPath bezierPathWithRoundedRect:[self bounds] xRadius:5.0 yRadius:5.0];
- [clipPath addClip];
- NSDrawNinePartImage([self bounds], topLeft, topCenter, topRight, middleLeft, middleCenter, middleRight, bottomLeft, bottomCenter, bottomRight, NSCompositeSourceOver, 1.0, NO);
- [ctx restoreGraphicsState];
- [super drawRect:dirtyRect];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement