summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorericm <ericm>2000-04-19 22:20:44 (GMT)
committerericm <ericm>2000-04-19 22:20:44 (GMT)
commit981af3eaf3d7d2aac6fc833575521e05a925811c (patch)
treef3c02e2e6954c9f9322d606d17f4e7e26a4b1f5a
parent65fb9b709cd298c9528eadbb2f5e7969a9b897c0 (diff)
downloadtk-981af3eaf3d7d2aac6fc833575521e05a925811c.zip
tk-981af3eaf3d7d2aac6fc833575521e05a925811c.tar.gz
tk-981af3eaf3d7d2aac6fc833575521e05a925811c.tar.bz2
* generic/tkRectOval.c (ConfigureRectOval): Added checks for valid
outline settings before creating of outline GC; this means that it is really possible now to have an oval or rectangle with no outline. [Bug: 5029].
-rw-r--r--ChangeLog7
-rw-r--r--generic/tkRectOval.c14
2 files changed, 18 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 28ee4a2..069e449 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2000-04-19 Eric Melski <ericm@scriptics.com>
+
+ * generic/tkRectOval.c (ConfigureRectOval): Added checks for valid
+ outline settings before creating of outline GC; this means that it
+ is really possible now to have an oval or rectangle with no
+ outline. [Bug: 5029].
+
2000-04-19 Jeff Hobbs <hobbs@scriptics.com>
* README:
diff --git a/generic/tkRectOval.c b/generic/tkRectOval.c
index b5c78e2..95634c5 100644
--- a/generic/tkRectOval.c
+++ b/generic/tkRectOval.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: tkRectOval.c,v 1.6 2000/02/01 11:41:10 hobbs Exp $
+ * RCS: @(#) $Id: tkRectOval.c,v 1.7 2000/04/19 22:20:45 ericm Exp $
*/
#include <stdio.h>
@@ -430,7 +430,6 @@ ConfigureRectOval(interp, canvas, itemPtr, argc, argv, flags)
(char *) rectOvalPtr, flags|TK_CONFIG_OBJS) != TCL_OK) {
return TCL_ERROR;
}
-
state = itemPtr->state;
/*
@@ -466,9 +465,18 @@ ConfigureRectOval(interp, canvas, itemPtr, argc, argv, flags)
tsoffset->yoffset = (int) (rectOvalPtr->bbox[2] + 0.5);
}
+ /*
+ * Configure the outline graphics context. If mask is non-zero,
+ * the gc has changed and must be reallocated, provided that the
+ * new settings specify a valid outline (non-zero width and non-NULL
+ * color)
+ */
+
mask = Tk_ConfigOutlineGC(&gcValues, canvas, itemPtr,
&(rectOvalPtr->outline));
- if (mask) {
+ if (mask && \
+ rectOvalPtr->outline.width != 0 && \
+ rectOvalPtr->outline.color != NULL) {
gcValues.cap_style = CapProjecting;
mask |= GCCapStyle;
newGC = Tk_GetGC(tkwin, mask, &gcValues);