Re: Cocoa and PICT
Re: Cocoa and PICT
- Subject: Re: Cocoa and PICT
- From: Scott Thompson <email@hidden>
- Date: Mon, 13 Aug 2007 14:49:16 -0500
On Aug 13, 2007, at 2:30 PM, I. Savant wrote:
On 8/13/07, Scott Thompson <email@hidden> wrote:
Try setting your flatness to something around 0.5 - 2.0 or so and you
should have something that is pretty smooth as you are going to get
it.
Thing is, adjusting the flatness doesn't seem to make much of a
visual difference ... I don't mind sacrificing performance for more
segments, but there just doesn't seem to be any difference between 0.2
and 1.0.
That's what I would expect. Although it's a rough correlation 1.0
basically means that at 100% magnification a curve segment can be
replaced by a straight line that does not deviate from the curve by
more than about a pixel. Now that I think about it, when you're using
QuickDraw, where the resolution is a full pixel, then theoretically
anything less than 1.0 is not really going to change anything.
That you're seeing the limit in practice at 2.0 doesn't surprise me.
Also, did you really mean 2.0? Isn't the convention usually that
1.0 is 100%?
The way I understand it, flatness is just a measure of error and
neither has units, nor represents any kind of percentage. It's
roughly a measure of how close a curve segment has to be to a straight
line before the system will simply replace it with a straight line.
A typical default flatness is 10.0.
Can you show me some of the results you're getting? You're probably
just getting roughness because of the lack of antialiasing.
If the default flattening algorithm doesn't meet your needs, then it's
pretty straightforward to write code to break down the Bezier curves
yourself.
Scott
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden