Re: NSBezierPath bugs? (Contains point and fill)
Re: NSBezierPath bugs? (Contains point and fill)
- Subject: Re: NSBezierPath bugs? (Contains point and fill)
- From: Lester Dowling <email@hidden>
- Date: Thu, 13 Oct 2005 15:51:13 +1000
Second, I have my image set to have NO alpha blending at all, so
drawing lines results in SOLID colors without and smoothing. Yet
again, when I use a non-rectangular NSBezierPath and fill its
contents to the background color, I will get some amount of grey
pixels around the edges. Sometimes it is more severe, others it is
less, but I'm hoping for some amount of pixel accuracy here. Again,
is this a known issue with workarounds? Are there any suggestions on
how to handle it?
I'm guessing you wish to draw into your image without aliasing the
edges,
aka anti-aliasing. You can turn aliasing on and off for the current
graphics
context, NSGraphicsContext. Eg,
NSGraphicsContext *currentContext = [NSGraphicsContext
currentContext];
[currentContext setShouldAntialias: NO ];
// ... draw jaggies
[ currentContext setShouldAntialias: YES ];
// ... draw smoothies
Along similar lines, you can adjust image smoothing with another method
in NSGraphicsContext. Eg,
[ currentContext setImageInterpolation: NSImageInterpolationNone ];
// ... jagged image ops
[ currentContext setImageInterpolation: NSImageInterpolationHigh ];
// ... smooth as black lace
--
Lester
_______________________________________________
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