• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSBezierPath winding rules and glyphs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: NSBezierPath winding rules and glyphs (From: Brock Brandenberg <email@hidden>)

  • Prev by Date: Populating an NSPopUpButton from an array
  • Next by Date: Re: File modification
  • Previous by thread: Re: NSBezierPath winding rules and glyphs
  • Next by thread: Re: How do you connect two classes (e.g IBOutlet and IBAction) when not using IB
  • Index(es):
    • Date
    • Thread