gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnustep-cvs] gnustep/core/gui ChangeLog Headers/AppKit/NSBez...


From: Fred Kiefer
Subject: Re: [Gnustep-cvs] gnustep/core/gui ChangeLog Headers/AppKit/NSBez...
Date: Wed, 12 Jan 2005 01:19:21 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040906

Hi Alexander,

Alexander Malmberg wrote:
CVSROOT:        /cvsroot/gnustep
Module name:    gnustep
Branch:         
Changes by:     Alexander Malmberg <address@hidden>       05/01/11 22:53:08

Modified files:
core/gui : ChangeLog core/gui/Headers/AppKit: NSBezierPath.h core/gui/Source: NSBezierPath.m
Log message:
        2005-01-11 23:50  Alexander Malmberg <address@hidden>
        
        * Headers/AppKit/NSBezierPath.h (NSWindingRule)
        (-containsPoint): Document.
        (-windingCountAtPoint:): New method.
        * Source/NSBezierPath.m: Remove some trailing whitespace.
        (PI): Correct rounding.
        (contribution, -contributionToContains:): Remove.
        (winding_line, winding_curve): New functions.
        (-windingCountAtPoint:): New method.
        (-containsPoint:): Use -windingCountAtPoint: instead of
        -contributionToContains:. Don't flatten the path.


I really like your new implemetnation of the containsPoint: method and it passes all teh tests I did write when implementing the last one.

There is just the problem that Banlu thinks that we have implemented the wrong behaviour here. What your code does is a better implementation of the old code, that is, find if the bezier path includes the point in some geometrical sense. What Banlu implemented in his Cairo backend and what he claims to be the actual behaviour for this method, is a Postscript like hit detection: Will this bezier path with its given line width, cap style and so on, touch the point, that is would it colour the point when drawing? I am not sure if his interpretation is correct and if so, if this would mean stroke mode or fill mode. The later should be more or less what you have implemented (ignoring the draw attributes).

The only way I could imagine to find out about this would be to grap an Apple computer and try with different paths.

Cheers
Fred

PS: Should the method windingCountAtPoint: be public and if so, shouldn't we mark it as GNUstep extension?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]