summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2002-08-08 04:54:01 (GMT)
committerhobbs <hobbs>2002-08-08 04:54:01 (GMT)
commit888f23262ad861e7d1698fe726c3623dc69d23eb (patch)
tree99a73ffd04f58ed0cfbd13ede9ba4d9774e3c645
parent00ab53bb531128551716b0a938caa4f60fd6c109 (diff)
downloadtk-888f23262ad861e7d1698fe726c3623dc69d23eb.zip
tk-888f23262ad861e7d1698fe726c3623dc69d23eb.tar.gz
tk-888f23262ad861e7d1698fe726c3623dc69d23eb.tar.bz2
* generic/tkCanvUtil.c (TkSmoothParseProc): recognize the built-in
bezier method by name. [Bug #578654] * doc/canvas.n: update to note that -smooth really doesn't take or return just booleans.
-rw-r--r--ChangeLog5
-rw-r--r--doc/canvas.n10
-rw-r--r--generic/tkCanvUtil.c9
3 files changed, 20 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 53c68f9..0f570c0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2002-08-07 Jeff Hobbs <jeffh@ActiveState.com>
+ * generic/tkCanvUtil.c (TkSmoothParseProc): recognize the built-in
+ bezier method by name. [Bug #578654]
+ * doc/canvas.n: update to note that -smooth really doesn't take
+ or return just booleans.
+
* win/tkWinMenu.c (TkpSetWindowMenuBar): fixed logic bug in when
to idle call ReconfigureWindowsMenu.
diff --git a/doc/canvas.n b/doc/canvas.n
index 550957c..c8ead38 100644
--- a/doc/canvas.n
+++ b/doc/canvas.n
@@ -6,7 +6,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.12 2001/03/30 00:15:53 hobbs Exp $
+'\" RCS: @(#) $Id: canvas.n,v 1.13 2002/08/08 04:54:01 hobbs Exp $
'\"
.so man.macros
.TH canvas n 8.3 Tk "Tk Built-In Commands"
@@ -1397,8 +1397,12 @@ If this option isn't specified then it defaults to \fBmiter\fR.
If the line only contains two points then this option is
irrelevant.
.TP
-\fB\-smooth \fIboolean\fR
-\fIBoolean\fR must have one of the forms accepted by \fBTk_GetBoolean\fR.
+\fB\-smooth \fIsmoothMethod\fR
+\fIsmoothMethod\fR must have one of the forms accepted by
+\fBTk_GetBoolean\fR or a line smoothing method. Only \fBbezier\fR is
+supported in the core, but more can be added at runtime. If a boolean
+false value or empty string is given, no smoothing is applied. A boolean
+truth value assume \fBbezier\fR smoothing.
It indicates whether or not the line should be drawn as a curve.
If so, the line is rendered as a set of parabolic splines: one spline
is drawn for the first and second line segments, one for the second
diff --git a/generic/tkCanvUtil.c b/generic/tkCanvUtil.c
index 80ba194..eb0c3cc 100644
--- a/generic/tkCanvUtil.c
+++ b/generic/tkCanvUtil.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: tkCanvUtil.c,v 1.7 2002/08/05 04:30:38 dgp Exp $
+ * RCS: @(#) $Id: tkCanvUtil.c,v 1.8 2002/08/08 04:54:01 hobbs Exp $
*/
#include "tkInt.h"
@@ -706,8 +706,15 @@ TkSmoothParseProc(clientData, interp, tkwin, value, widgRec, offset)
if (smooth) {
*smoothPtr = smooth;
return TCL_OK;
+ } else if (strncmp(value, tkBezierSmoothMethod.name, length) == 0) {
+ /*
+ * We need to do handle the built-in bezier method.
+ */
+ *smoothPtr = &tkBezierSmoothMethod;
+ return TCL_OK;
}
+
if (Tcl_GetBoolean(interp, (char *) value, &b) != TCL_OK) {
return TCL_ERROR;
}