From: <no...@so...> - 2001-05-30 18:40:03
|
Bugs item #226357, was updated on 2000-12-19 09:14 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=112997&aid=226357&group_id=12997 Category: Canvas Items Group: 8.4a3 Status: Open >Resolution: Fixed Priority: 7 Submitted By: Gerhard Hintermayer (hinteger) Assigned to: Nobody/Anonymous (nobody) Summary: Overlapping with Polygon objects wrong Initial Comment: According to the man page a point inside the polygon should return the polygon id when calling [canvas find overlapping]. Don´t know when this changed, it worked well under 8.0.5, and does not work with 8.4a1 and 8.4a2. ---------------------------------------------------------------------- >Comment By: John Ellson (ellson) Date: 2001-05-30 11:39 Message: Logged In: YES user_id=3788 Here's a fix, I think. I can think of no reason why a test for fill is needed at line 1488 in tkCanvPoly.c. . Anyway, removing the test works for me (see patch) (How does this fix get into CVS now?) ---------------------------------------------------------------------- Comment By: Gerhard Hintermayer (hinteger) Date: 2001-05-30 10:38 Message: Logged In: YES user_id=124720 Yes, that's true. The error must have been introduced somewhere after 8.0.5 and before 8.3.2 (I migrated my script from 8.0.5 to 8.3.2 and discovered the bug) In addition <Enter> and <Leave> events are _not_ generated, if you move the mouse over the polygon so fast, so that you don't hit a vertice. ---------------------------------------------------------------------- Comment By: John Ellson (ellson) Date: 2001-05-30 10:11 Message: Logged In: YES user_id=3788 The problem seems to be specific to -fill "" e.g. this fails in 8.4a3 from CVS 5/30/01 pack [canvas .c] .c create poly 30 30 30 90 90 90 90 30 -fill "" -outline black puts [.c find over 45 45 45 45] puts [.c find over 0 0 0 0] ---------------------------------------------------------------------- Comment By: Gerhard Hintermayer (hinteger) Date: 2000-12-21 08:08 Message: I use -fill "" and -outline black for the polygon, i forgot to write that. When the overlapping rectangle is over a vertice, it works, inside the polygon it does't in your example .c find over 60 40 60 40 should return 1 I get an empty string ---------------------------------------------------------------------- Comment By: Donal K. Fellows (dkf) Date: 2000-12-20 02:03 Message: It seems to work for me under Solaris: $ /tmp/bin/wish8.4 % pack [canvas .c];.c create poly 30 30 90 90 30 90 90 30 1 % .c find over 40 40 45 45 1 % .c find over 40 40 40 40 1 % .c find over 0 0 0 0 % .c find over 30 40 30 40 % .c find over 40 30 40 30 1 % info patch 8.4a2 Could you supply some more details? ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=112997&aid=226357&group_id=12997 |