summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2001-07-18 16:15:27 (GMT)
committerdgp <dgp@users.sourceforge.net>2001-07-18 16:15:27 (GMT)
commit7579591f206b6d54248431b9488d158e82659685 (patch)
tree611edd5d2537c7afb58257fe0afac41e3b373f53
parentd5bd088d898d07998e07af0f9e4cb6a29f342d38 (diff)
downloadtk-7579591f206b6d54248431b9488d158e82659685.zip
tk-7579591f206b6d54248431b9488d158e82659685.tar.gz
tk-7579591f206b6d54248431b9488d158e82659685.tar.bz2
* Correction in merge from HEAD
-rw-r--r--generic/tkCanvPoly.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/generic/tkCanvPoly.c b/generic/tkCanvPoly.c
index 5b2761e..3d56c39 100644
--- a/generic/tkCanvPoly.c
+++ b/generic/tkCanvPoly.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkCanvPoly.c,v 1.6.4.1 2001/07/03 20:01:07 dgp Exp $
+ * RCS: @(#) $Id: tkCanvPoly.c,v 1.6.4.2 2001/07/18 16:15:27 dgp Exp $
*/
#include <stdio.h>
@@ -1484,18 +1484,14 @@ PolygonToArea(canvas, itemPtr, rectPtr)
polyPoints = polyPtr->coordPtr;
}
- if (polyPtr->fillGC != None) {
- inside = TkPolygonToArea(polyPoints, numPoints, rectPtr);
- if (inside==0) goto donearea;
- } else {
- if ((polyPoints[0] >= rectPtr[0])
- && (polyPoints[0] <= rectPtr[2])
- && (polyPoints[1] >= rectPtr[1])
- && (polyPoints[1] <= rectPtr[3])) {
- inside = 1;
- }
- }
-
+ /*
+ * Simple test to see if we are in the polygon. Polygons are
+ * different from othe canvas items in that they register points
+ * being inside even if it isn't filled.
+ */
+ inside = TkPolygonToArea(polyPoints, numPoints, rectPtr);
+ if (inside==0) goto donearea;
+
if (polyPtr->outline.gc == None) goto donearea ;