Hi Graham,

On 08/07/2008, at 10:16 PM, Graham Cox wrote:

A close second best would be a rect that was the worst case bounds for a given stroke width (it wouldn't need to know the actual path, just its basic bounds), which thus assumed that all angles were acute enough to trigger the mitre conversion. Even that is proving hard to figure, as I'm probably not really understand the miter limit calculation. The docs state:

Well, the miter limit is simply the point at which the join is converted to a bevel join and a bevel join will always have a smaller bounding box than a mitre join so you can get a worst case bounds by ignoring the mitre limit.

"The miter limit helps you avoid spikes at the junction of two line segments connected by a miter join (NSMiterLineJoinStyle). If the ratio of the miter length—the diagonal length of the miter join—to the line thickness exceeds the miter limit, the joint is converted to a bevel join. The default miter limit value is 10, which converts miters whose angle at the joint is less than 11 degrees."

So what *is it*? A value in degrees? Or a ratio of two sides of a triangle? What triangle, exactly? How can I tell just how far out I need to outset the rect to make sure I'm always just outside the edge of any mitred corner?

You should have a look at the PDF specification (you can easily get hold of it). It explains exactly what it is.

-- Chris

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to