summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--changes7
-rw-r--r--doc/canvas.n3
-rw-r--r--generic/tkCanvText.c4
-rw-r--r--tests/canvText.test3
4 files changed, 12 insertions, 5 deletions
diff --git a/changes b/changes
index bd42a94..fbc893b 100644
--- a/changes
+++ b/changes
@@ -2,7 +2,7 @@ This file summarizes all changes made to Tk since version 1.0 was
released on March 13, 1991. Changes that aren't backward compatible
are marked specially.
-RCS: @(#) $Id: changes,v 1.23 1998/10/13 18:13:05 rjohnson Exp $
+RCS: @(#) $Id: changes,v 1.24 1998/10/16 00:46:18 rjohnson Exp $
3/16/91 (bug fix) Modified tkWindow.c to remove Tk's Tcl commands from
the interpreter when the main window is deleted (otherwise there will
@@ -4266,3 +4266,8 @@ almost constant time which improves certain canvas operations
(exspecially for canvases with large number items). Thanks to Mark
Weissman <weissman@gte.com> and Jan Nijtmans <Jan.Nijtmans@wxs.nl>
for submitting this improvement. (RJ)
+
+10/15/98 (bug fix) The -fill option to text items in the canvas did
+not allow the empty string as an argument (meaning transparent) even
+though every other item type did. Thanks to Sebastian Wangnick
+<sebastian.wangnick@eurocontrol.be> for supplying this patch. (RJ)
diff --git a/doc/canvas.n b/doc/canvas.n
index 98ba165..6c41581 100644
--- a/doc/canvas.n
+++ b/doc/canvas.n
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: canvas.n,v 1.2 1998/09/14 18:22:55 stanton Exp $
+'\" RCS: @(#) $Id: canvas.n,v 1.3 1998/10/16 00:46:18 rjohnson Exp $
'\"
.so man.macros
.TH canvas n 4.0 Tk "Tk Built-In Commands"
@@ -1446,6 +1446,7 @@ This option defaults to \fBcenter\fR.
\fB\-fill \fIcolor\fR
\fIColor\fR specifies a color to use for filling the text characters;
it may have any of the forms accepted by \fBTk_GetColor\fR.
+If \fIcolor\fR is an empty string then the text will be transparent.
If this option isn't specified then it defaults to \fBblack\fR.
.TP
\fB\-font \fIfontName\fR
diff --git a/generic/tkCanvText.c b/generic/tkCanvText.c
index 298553a..93230f7 100644
--- a/generic/tkCanvText.c
+++ b/generic/tkCanvText.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkCanvText.c,v 1.2 1998/09/14 18:23:05 stanton Exp $
+ * RCS: @(#) $Id: tkCanvText.c,v 1.3 1998/10/16 00:46:19 rjohnson Exp $
*/
#include <stdio.h>
@@ -86,7 +86,7 @@ static Tk_ConfigSpec configSpecs[] = {
"center", Tk_Offset(TextItem, anchor),
TK_CONFIG_DONT_SET_DEFAULT},
{TK_CONFIG_COLOR, "-fill", (char *) NULL, (char *) NULL,
- "black", Tk_Offset(TextItem, color), 0},
+ "black", Tk_Offset(TextItem, color), TK_CONFIG_NULL_OK},
{TK_CONFIG_FONT, "-font", (char *) NULL, (char *) NULL,
DEF_CANVTEXT_FONT, Tk_Offset(TextItem, tkfont), 0},
{TK_CONFIG_JUSTIFY, "-justify", (char *) NULL, (char *) NULL,
diff --git a/tests/canvText.test b/tests/canvText.test
index 31566f6..9263e87 100644
--- a/tests/canvText.test
+++ b/tests/canvText.test
@@ -7,7 +7,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: canvText.test,v 1.2 1998/09/14 18:23:44 stanton Exp $
+# RCS: @(#) $Id: canvText.test,v 1.3 1998/10/16 00:46:19 rjohnson Exp $
if {"[info procs test]" != "test"} {
source defs
@@ -34,6 +34,7 @@ set ax [font measure $font 0]
foreach test {
{-anchor nw nw xyz {bad anchor position "xyz": must be n, ne, e, se, s, sw, w, nw, or center}}
{-fill #ff0000 #ff0000 xyz {unknown color name "xyz"}}
+ {-fill {} {} {} {}}
{-font {Times 40} {Times 40} {} {font "" doesn't exist}}
{-justify left left xyz {bad justification "xyz": must be left, right, or center}}
{-stipple gray50 gray50 xyz {bitmap "xyz" not defined}}