Re: NSBezierPath Fill and Stroke woes;
Re: NSBezierPath Fill and Stroke woes;
- Subject: Re: NSBezierPath Fill and Stroke woes;
- From: Scott Thompson <email@hidden>
- Date: Thu, 21 Jul 2005 10:09:43 -0500
On Jul 21, 2005, at 10:00 AM, Matt Budd (Madentec) wrote:
That was the exact issue! I didn't realize that NSGraphicsContext
had a -setShouldAntiAlias: method...I assumed (that should have
been my first clue) that image interpolation (something which I had
done before to do antialiasing effects on scaled images) was just
Apple's fancy name for antialising.
I've changed it to use -setShouldAntiAlias: and it does what I
need. Kinda weird that this value is not stored as part of the
graphics state, but I just manually have to restore it myself.
Thanks for the help!
- Matt
That is odd that it is not part of the graphics state. Evidently
it's calling CGContextSetAllowsAntialiasing instead of
CGContextSetShouldAntialias in spite of it's name.
You might be able to do something like this:
[NSGraphicsContext saveGraphicsState];
CGContextRef myContext = (CGContextRef) [[NSGraphicsContext
currentContext] graphicsPort];
CGContextSetShouldAntialias(myContext, false);
... draw ...
[NSGraphicsContext restoreGraphicsState];
which should save and restore the antialiasing as part of the
graphics state.
If that works, then you could do something clever like add a method
to NSGraphicsContext through a category to trip the
CGContextSetShouldAntialias bit.
Scott
_______________________________________________
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