Re: NSBezierPath winding rules and glyphs
Re: NSBezierPath winding rules and glyphs
- Subject: Re: NSBezierPath winding rules and glyphs
- From: Joakim Johansson <email@hidden>
- Date: Wed, 26 Mar 2003 00:05:56 +0100
Hi,
On svndag, mar 23, 2003, at 18:52 Europe/Stockholm, Brock Brandenberg
wrote:
>
closer about intersecting the path with a ray). So, the only way to
>
get a
>
filled center is to set to NSNonZeroWindingRule and reverse the
>
interior
>
bezier path directions manually so that they all wind in the same
>
direction.
>
This is not trivial, and unfortunately I don't have an immediate
>
solution to
>
suggest.
>
Just thought I'd say I have found a simple and straightforward solution
which at least works (but could probably be improved upon, it will only
work perfectly for reasonably well formed paths, but that can be fixed
with little work if desired) and is good enough for my needs in case
someone else is interested.
I simply wrote a category method to NSBezierPath:
- (void) unconditionalFill;
which just iterates over the path elements and reconstructs the path
in a new temporary bezierpath - when a closePath is encountered, it
simply
fills the temporary path and throws away the current contents and
continues over
the remaining elements of the path.
Joakim
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.