On Apr 25, 2008, at 10:18 PM, Aaron Wallis wrote:
I've been having a fair few issues with NSBezier boxes lately (a.k.a
boxes with rounded corners)
I've created a NSView subclass that contains the following code,
then threw a few on a window with some controls over the top:
- ( void ) draw
Oh!!
LEGEND!!!
That totally fixed the bug!
for the record, the following code fixes the artefacts:
- ( void ) drawRect: ( NSRect ) rect
{
NSBezierPath* thePath = [NSBezierPath bezierPath];
[thePath appendBezierPathWithRoundedRect:[self bounds] xRadius:10.0
yRadius:10.0];
[th
The "rect" arguments is not you whole frame. This is only the rect
that need to be redraw. It may be smaller than your view.
If you want to fill you view using a rounded rect, so you have to use
[self bounds] instead of rect.
Le 26 avr. 08 à 07:18, Aaron Wallis a écrit :
I've been having a
I've been having a fair few issues with NSBezier boxes lately (a.k.a
boxes with rounded corners)
I've created a NSView subclass that contains the following code, then
threw a few on a window with some controls over the top:
- ( void ) drawRect: ( NSRect ) rect
{
NSBezierPath* thePath