• 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: Weird problem with NSBezierpath fill method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird problem with NSBezierpath fill method


  • Subject: Re: Weird problem with NSBezierpath fill method
  • From: Brian Smith <email@hidden>
  • Date: Fri, 10 Nov 2006 16:30:29 +0800

What about having multiple path segments, which cause the path not to be closed? (Basically you have a sequence like moveto lineto moveto curveto lineto moveto curveto .... etc. in a single NSBezierpath)

Brian

On Nov 10, 2006, at 3:38 PM, Vinay Prabhu wrote:

The fill method will implicitly close if there is any open subpaths.
Also, I have tried closing the path explicitly and then calling the fill
method.
But it din't work either...


-----Original Message-----
From: Brian Smith [mailto:email@hidden]
Sent: Friday, November 10, 2006 12:57 PM
To: Vinay Prabhu
Cc: email@hidden
Subject: Re: Weird problem with NSBezierpath fill method


Just a thought, but have you tried telling the NSBezierpath to close it's path.

Brian

On Nov 10, 2006, at 12:56 PM, Vinay Prabhu wrote:

The path is actually generated from the 32-bit masked image.
The points and directions are found along the masking region with an
algorithm
and created a path using those points and directions.

I have tried using both winding rules available. But in both cases the
region enclosing the path
did not get filled by the "fill" method.


I am wondering why it works for simple rect and not for complex paths?

-----Original Message-----
From: Andrew Farmer [mailto:email@hidden]
Sent: Friday, November 10, 2006 1:50 AM
To: Vinay Prabhu
Cc: email@hidden
Subject: Re: Weird problem with NSBezierpath fill method


On 09 Nov 06, at 03:58, Vinay Prabhu wrote: <...>
[m_pInnerOutline setWindingRule:NSEvenOddWindingRule];
<...>

The "stroke" method works fine, but the "fill" method will not work. I had saved the drawImage as tif image and attached with the mail.

I am not understanding why "fill" method is not working !!!!
If bezier path contains only rectangle, the fill method works fine.

How is your path generated? I'm wondering if it's got the wrong winding direction or something. Try adding points in the opposite order and see if that makes any difference.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40suaveware.com


This email sent to email@hidden




_______________________________________________ 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
References: 
 >RE: Weird problem with NSBezierpath fill method (From: Vinay Prabhu <email@hidden>)

  • Prev by Date: RE: Weird problem with NSBezierpath fill method
  • Next by Date: Convert path format?
  • Previous by thread: RE: Weird problem with NSBezierpath fill method
  • Next by thread: How to traverse from one window to another
  • Index(es):
    • Date
    • Thread