newGraphic problem

Karl Becker karl at karlbecker.com
Tue Sep 10 11:51:01 EDT 2002


On Tuesday, September 10, 2002, at 03:18  AM, Dave Cragg wrote:

> 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.

It's not working with anything, whether it's a circle, triangle, or 
concave or convex object.
Calling the function outside of this newGraphic handler results in a 
proper value being returned (true or false).

I'm stumped!

--
Karl Becker, KB Productions
http://www.karlbecker.com




More information about the metacard mailing list