newGraphic problem

Dave Cragg dcragg at lacscentre.co.uk
Tue Sep 10 04:20:01 EDT 2002


On Tuesday, September 10, 2002, at 12:08 AM, Karl Becker wrote:

> I'm using 2.4.3.  Maybe I explained this wrong.
>
> I want it to work only on the graphic, not on the rect of the graphic. 
>  I'm calling the function:
> within( grc id drawnID, bufLoc )   --actual syntax
> and it is returning true, even when bufLoc (an x,y location) is 
> clearly not in the drawn portion of the graphic.  It's returning true 
> even when the location is outside of the weird (read: non-rectangular) 
> bounds of the object.

How weird is your shape? I notice from some quick testing that if a 
shape has a concave area (e.g a crescent-moon shape), the within 
function returns true if the point is within the concave area, even 
though it is outside of the shape's boundary.

With more regular shapes, (circles, triangles, etc.) it seems to work 
as you would expect.

I think making your own function for "weird" shapes will be difficult. 
Perhaps some of the maths people on the list can help.

Cheers
Dave




More information about the metacard mailing list