From 33ce16d6210cd4238a3957bde837c995160395e7 Mon Sep 17 00:00:00 2001 From: Ivica Ico Bukvic <ico@vt.edu> Date: Fri, 13 Sep 2013 01:23:00 -0400 Subject: [PATCH] tkpath version bump (and currently a new fork until this gets merged upstream) fixing scaling bug where applying scale matrix (or scaling) objects would leave artifacts since its bbox translation did not take into account transformation matrix --- pd/tkpath/ChangeLog | 12 +++++++++ pd/tkpath/configure | 18 ++++++------- pd/tkpath/configure.in | 2 +- pd/tkpath/generic/path.c | 2 +- pd/tkpath/generic/tkCanvEllipse.c | 2 +- pd/tkpath/generic/tkCanvGradient.c | 2 +- pd/tkpath/generic/tkCanvGroup.c | 2 +- pd/tkpath/generic/tkCanvPath.c | 30 +++++++++------------ pd/tkpath/generic/tkCanvPathUtil.c | 14 ++++++---- pd/tkpath/generic/tkCanvPathUtil.h | 2 +- pd/tkpath/generic/tkCanvPimage.c | 15 +++++------ pd/tkpath/generic/tkCanvPline.c | 16 +++++------ pd/tkpath/generic/tkCanvPpoly.c | 30 +++++++++------------ pd/tkpath/generic/tkCanvPrect.c | 43 ++++++++++++++---------------- pd/tkpath/generic/tkCanvPtext.c | 20 +++++++------- pd/tkpath/generic/tkCanvStyle.c | 2 +- pd/tkpath/generic/tkIntPath.h | 2 +- pd/tkpath/generic/tkPath.c | 2 +- pd/tkpath/generic/tkPath.h | 9 +------ pd/tkpath/generic/tkPathGradient.c | 2 +- pd/tkpath/generic/tkPathStyle.c | 2 +- pd/tkpath/generic/tkPathStyle.h | 2 +- pd/tkpath/generic/tkPathSurface.c | 2 +- pd/tkpath/generic/tkPathTkDraw.c | 2 +- pd/tkpath/generic/tkPathUtil.c | 3 ++- pd/tkpath/generic/tkp.h | 13 ++++++++- pd/tkpath/generic/tkpCanvArc.c | 2 +- pd/tkpath/generic/tkpCanvBmap.c | 2 +- pd/tkpath/generic/tkpCanvImg.c | 2 +- pd/tkpath/generic/tkpCanvLine.c | 2 +- pd/tkpath/generic/tkpCanvPoly.c | 2 +- pd/tkpath/generic/tkpCanvPs.c | 2 +- pd/tkpath/generic/tkpCanvText.c | 2 +- pd/tkpath/generic/tkpCanvUtil.c | 2 +- pd/tkpath/generic/tkpCanvWind.c | 2 +- pd/tkpath/generic/tkpCanvas.c | 6 ++--- pd/tkpath/generic/tkpCanvas.h | 2 +- pd/tkpath/generic/tkpRectOval.c | 2 +- pd/tkpath/generic/tkpTrig.c | 2 +- pd/tkpath/generic/tkpUtil.c | 2 +- 40 files changed, 144 insertions(+), 139 deletions(-) diff --git a/pd/tkpath/ChangeLog b/pd/tkpath/ChangeLog index bacbbebfa..ad4cc27e9 100755 --- a/pd/tkpath/ChangeLog +++ b/pd/tkpath/ChangeLog @@ -1,3 +1,15 @@ +2013-09-12 Ivica Ico Bukvic <ico@vt.edu> + + * moved bbox and totalBbox to Tk_PathItem to make it visible + to Translate calls that previously failed to take into + account transforms via matrices (e.g. scale). This resulted + in artifacts left behind when translating objects with + scaling matrices applied to them (the same solves scale + calls and potentially ensuing artifacts as well) + * adapted all objects to reflect aforesaid change + * merged patch by Sean McKnight found at: + https://sourceforge.net/p/tclbitprint/patches/3/ + 2012-07-04 George Petasis <petasis@iit.demokritos.gr> * generic/tkpUtil.c: Fix in the tkStateKeyObjType definistion, in diff --git a/pd/tkpath/configure b/pd/tkpath/configure index 77d4c6199..7fcd79fa1 100755 --- a/pd/tkpath/configure +++ b/pd/tkpath/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for tkpath 0.3.2. +# Generated by GNU Autoconf 2.68 for tkpath 0.3.3. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -557,8 +557,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='tkpath' PACKAGE_TARNAME='tkpath' -PACKAGE_VERSION='0.3.2' -PACKAGE_STRING='tkpath 0.3.2' +PACKAGE_VERSION='0.3.3' +PACKAGE_STRING='tkpath 0.3.3' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1292,7 +1292,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures tkpath 0.3.2 to adapt to many kinds of systems. +\`configure' configures tkpath 0.3.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1353,7 +1353,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of tkpath 0.3.2:";; + short | recursive ) echo "Configuration of tkpath 0.3.3:";; esac cat <<\_ACEOF @@ -1457,7 +1457,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -tkpath configure 0.3.2 +tkpath configure 0.3.3 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1914,7 +1914,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by tkpath $as_me 0.3.2, which was +It was created by tkpath $as_me 0.3.3, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -10260,7 +10260,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by tkpath $as_me 0.3.2, which was +This file was extended by tkpath $as_me 0.3.3, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -10313,7 +10313,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -tkpath config.status 0.3.2 +tkpath config.status 0.3.3 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/pd/tkpath/configure.in b/pd/tkpath/configure.in index ca62abab0..d1dbd1bad 100644 --- a/pd/tkpath/configure.in +++ b/pd/tkpath/configure.in @@ -18,7 +18,7 @@ dnl to configure the system for the local environment. # so you can encode the package version directly into the source files. #----------------------------------------------------------------------- -AC_INIT([tkpath], [0.3.2]) +AC_INIT([tkpath], [0.3.3]) #-------------------------------------------------------------------- # Call TEA_INIT as the first TEA_ macro to set up initial vars. diff --git a/pd/tkpath/generic/path.c b/pd/tkpath/generic/path.c index b4f1514ea..9a4e5060c 100644 --- a/pd/tkpath/generic/path.c +++ b/pd/tkpath/generic/path.c @@ -6,7 +6,7 @@ * * Copyright (c) 2005-2008 Mats Bengtsson * - * $Id$ + * $Id: path.c,v 1.39 2012/07/05 06:41:15 petasis Exp $ */ #include "tkp.h" diff --git a/pd/tkpath/generic/tkCanvEllipse.c b/pd/tkpath/generic/tkCanvEllipse.c index 520f13be3..25f973149 100644 --- a/pd/tkpath/generic/tkCanvEllipse.c +++ b/pd/tkpath/generic/tkCanvEllipse.c @@ -6,7 +6,7 @@ * * Copyright (c) 2007-2008 Mats Bengtsson * - * $Id$ + * $Id: tkCanvEllipse.c,v 1.30 2010/04/30 10:16:00 ebrunel Exp $ */ #include "tkIntPath.h" diff --git a/pd/tkpath/generic/tkCanvGradient.c b/pd/tkpath/generic/tkCanvGradient.c index 8f50c818e..429e57914 100644 --- a/pd/tkpath/generic/tkCanvGradient.c +++ b/pd/tkpath/generic/tkCanvGradient.c @@ -7,7 +7,7 @@ * * TODO: o Add tkwin option here and there so we can free stop colors! * - * $Id$ + * $Id: tkCanvGradient.c,v 1.3 2012/07/04 19:43:18 petasis Exp $ */ #include "tkIntPath.h" diff --git a/pd/tkpath/generic/tkCanvGroup.c b/pd/tkpath/generic/tkCanvGroup.c index f6d62ed1d..653fabdb4 100644 --- a/pd/tkpath/generic/tkCanvGroup.c +++ b/pd/tkpath/generic/tkCanvGroup.c @@ -6,7 +6,7 @@ * * Copyright (c) 2008 Mats Bengtsson * - * $Id$ + * $Id: tkCanvGroup.c,v 1.9 2008/07/23 07:08:37 matben Exp $ */ #include <float.h> diff --git a/pd/tkpath/generic/tkCanvPath.c b/pd/tkpath/generic/tkCanvPath.c index 27e2712c0..d44642694 100644 --- a/pd/tkpath/generic/tkCanvPath.c +++ b/pd/tkpath/generic/tkCanvPath.c @@ -6,7 +6,7 @@ * * Copyright (c) 2005-2008 Mats Bengtsson * - * $Id$ + * $Id: tkCanvPath.c,v 1.55 2012/07/04 19:43:18 petasis Exp $ */ #include "tkIntPath.h" @@ -35,10 +35,6 @@ typedef struct PathItem { int pathLen; Tcl_Obj *normPathObjPtr;/* The object containing the normalized path. */ PathAtom *atomPtr; - PathRect bbox; /* Bounding box with zero width outline. - * Untransformed coordinates. */ - PathRect totalBbox; /* Bounding box including stroke. - * Untransformed coordinates. */ int maxNumSegments; /* Max number of straight segments (for subpath) * needed for Area and Point functions. */ long flags; /* Various flags, see enum. */ @@ -215,8 +211,8 @@ CreatePath( pathPtr->pathLen = 0; pathPtr->normPathObjPtr = NULL; pathPtr->atomPtr = NULL; - pathPtr->bbox = NewEmptyPathRect(); - pathPtr->totalBbox = NewEmptyPathRect(); + itemPtr->bbox = NewEmptyPathRect(); + itemPtr->totalBbox = NewEmptyPathRect(); pathPtr->maxNumSegments = 0; pathPtr->flags = 0L; @@ -404,10 +400,10 @@ ComputePathBbox( * Get an approximation of the path's bounding box * assuming zero stroke width. */ - pathPtr->bbox = GetGenericBarePathBbox(pathPtr->atomPtr); - pathPtr->totalBbox = GetGenericPathTotalBboxFromBare(pathPtr->atomPtr, - &style, &pathPtr->bbox); - SetGenericPathHeaderBbox(&itemExPtr->header, style.matrixPtr, &pathPtr->totalBbox); + itemPtr->bbox = GetGenericBarePathBbox(pathPtr->atomPtr); + itemPtr->totalBbox = GetGenericPathTotalBboxFromBare(pathPtr->atomPtr, + &style, &itemPtr->bbox); + SetGenericPathHeaderBbox(&itemExPtr->header, style.matrixPtr, &itemPtr->totalBbox); TkPathCanvasFreeInheritedStyle(&style); } @@ -586,7 +582,7 @@ DisplayPath( if (pathPtr->pathLen > 2) { style = TkPathCanvasInheritStyle(itemPtr, 0); TkPathDrawPath(Tk_PathCanvasTkwin(canvas), drawable, pathPtr->atomPtr, - &style, &m, &pathPtr->bbox); + &style, &m, &itemPtr->bbox); TkPathCanvasFreeInheritedStyle(&style); } } @@ -903,10 +899,10 @@ ScalePath( pathPtr->flags |= kPathItemNeedNewNormalizedPath; /* Just scale the bbox'es as well. */ - ScalePathRect(&pathPtr->bbox, originX, originY, scaleX, scaleY); - NormalizePathRect(&pathPtr->bbox); + ScalePathRect(&itemPtr->bbox, originX, originY, scaleX, scaleY); + NormalizePathRect(&itemPtr->bbox); - ScalePathRect(&pathPtr->totalBbox, originX, originY, scaleX, scaleY); + ScalePathRect(&itemPtr->totalBbox, originX, originY, scaleX, scaleY); NormalizePathRect(&r); ScaleItemHeader(itemPtr, originX, originY, scaleX, scaleY); } @@ -948,8 +944,8 @@ TranslatePath( pathPtr->flags |= kPathItemNeedNewNormalizedPath; /* Just translate the bbox'es as well. */ - TranslatePathRect(&pathPtr->bbox, deltaX, deltaY); - TranslatePathRect(&pathPtr->totalBbox, deltaX, deltaY); + TranslatePathRect(&itemPtr->bbox, deltaX, deltaY); + TranslatePathRect(&itemPtr->totalBbox, deltaX, deltaY); TranslateItemHeader(itemPtr, deltaX, deltaY); } diff --git a/pd/tkpath/generic/tkCanvPathUtil.c b/pd/tkpath/generic/tkCanvPathUtil.c index 14bfe2f5f..56b3d09d7 100644 --- a/pd/tkpath/generic/tkCanvPathUtil.c +++ b/pd/tkpath/generic/tkCanvPathUtil.c @@ -6,7 +6,7 @@ * * Copyright (c) 2008 Mats Bengtsson * - * $Id$ + * $Id: tkCanvPathUtil.c,v 1.34 2008/08/10 08:02:17 matben Exp $ */ #include "tkPathStyle.h" @@ -1963,10 +1963,14 @@ TranslateItemHeader(Tk_PathItem *itemPtr, double deltaX, double deltaY) /* If all coords == -1 the item is hidden. */ if ((itemPtr->x1 != -1) || (itemPtr->x2 != -1) || (itemPtr->y1 != -1) || (itemPtr->y2 != -1)) { - itemPtr->x1 += (int) deltaX; - itemPtr->x2 += (int) deltaX; - itemPtr->y1 += (int) deltaY; - itemPtr->y2 += (int) deltaY; + Tk_PathStyle style; + style = TkPathCanvasInheritStyle(itemPtr, kPathMergeStyleNotFill); + SetGenericPathHeaderBbox(itemPtr, style.matrixPtr, &itemPtr->totalBbox); + TkPathCanvasFreeInheritedStyle(&style); + /*itemPtr->x1 += (int) deltaX; + itemPtr->x2 += (int) deltaX; + itemPtr->y1 += (int) deltaY; + itemPtr->y2 += (int) deltaY;*/ } } diff --git a/pd/tkpath/generic/tkCanvPathUtil.h b/pd/tkpath/generic/tkCanvPathUtil.h index 8a055949c..03d271001 100644 --- a/pd/tkpath/generic/tkCanvPathUtil.h +++ b/pd/tkpath/generic/tkCanvPathUtil.h @@ -5,7 +5,7 @@ * * Copyright (c) 2007-2008 Mats Bengtsson * - * $Id$ + * $Id: tkCanvPathUtil.h,v 1.24 2008/07/16 13:17:28 matben Exp $ */ #ifndef INCLUDED_TKCANVPATHUTIL_H diff --git a/pd/tkpath/generic/tkCanvPimage.c b/pd/tkpath/generic/tkCanvPimage.c index 86e2de74a..f9404c5a4 100644 --- a/pd/tkpath/generic/tkCanvPimage.c +++ b/pd/tkpath/generic/tkCanvPimage.c @@ -6,7 +6,7 @@ * * Copyright (c) 2007-2008 Mats Bengtsson * - * $Id$ + * $Id: tkCanvPimage.c,v 1.27 2010/04/30 10:16:00 ebrunel Exp $ */ #include "tkIntPath.h" @@ -42,8 +42,6 @@ typedef struct PimageItem { Tk_PhotoHandle photo; double width; /* If 0 use natural width or height. */ double height; - PathRect bbox; /* Bounding box with zero width outline. - * Untransformed coordinates. */ } PimageItem; @@ -192,7 +190,7 @@ CreatePimage(Tcl_Interp *interp, Tk_PathCanvas canvas, struct Tk_PathItem *itemP pimagePtr->photo = NULL; pimagePtr->height = 0; pimagePtr->width = 0; - pimagePtr->bbox = NewEmptyPathRect(); + itemPtr->bbox = NewEmptyPathRect(); if (optionTable == NULL) { optionTable = Tk_CreateOptionTable(interp, optionSpecs); @@ -267,6 +265,7 @@ GetTMatrix(PimageItem *pimagePtr) void ComputePimageBbox(Tk_PathCanvas canvas, PimageItem *pimagePtr) { + Tk_PathItem *itemPtr = (Tk_PathItem *)pimagePtr; Tk_PathState state = pimagePtr->header.state; TMatrix matrix; int width = 0, height = 0; @@ -291,7 +290,7 @@ ComputePimageBbox(Tk_PathCanvas canvas, PimageItem *pimagePtr) bbox.y1 = pimagePtr->coord[1]; bbox.x2 = bbox.x1 + width; bbox.y2 = bbox.y1 + height; - pimagePtr->bbox = bbox; + itemPtr->bbox = bbox; matrix = GetTMatrix(pimagePtr); SetGenericPathHeaderBbox(&pimagePtr->header, &matrix, &bbox); } @@ -472,7 +471,7 @@ PimageToPoint(Tk_PathCanvas canvas, Tk_PathItem *itemPtr, double *pointPtr) { PimageItem *pimagePtr = (PimageItem *) itemPtr; TMatrix m = GetTMatrix(pimagePtr); - return PathRectToPointWithMatrix(pimagePtr->bbox, &m, pointPtr); + return PathRectToPointWithMatrix(itemPtr->bbox, &m, pointPtr); } static int @@ -480,7 +479,7 @@ PimageToArea(Tk_PathCanvas canvas, Tk_PathItem *itemPtr, double *areaPtr) { PimageItem *pimagePtr = (PimageItem *) itemPtr; TMatrix m = GetTMatrix(pimagePtr); - return PathRectToAreaWithMatrix(pimagePtr->bbox, &m, areaPtr); + return PathRectToAreaWithMatrix(itemPtr->bbox, &m, areaPtr); } static int @@ -502,7 +501,7 @@ TranslatePimage(Tk_PathCanvas canvas, Tk_PathItem *itemPtr, double deltaX, doubl PimageItem *pimagePtr = (PimageItem *) itemPtr; /* Just translate the bbox'es as well. */ - TranslatePathRect(&(pimagePtr->bbox), deltaX, deltaY); + TranslatePathRect(&(itemPtr->bbox), deltaX, deltaY); pimagePtr->coord[0] += deltaX; pimagePtr->coord[1] += deltaY; TranslateItemHeader(itemPtr, deltaX, deltaY); diff --git a/pd/tkpath/generic/tkCanvPline.c b/pd/tkpath/generic/tkCanvPline.c index 4fd94a4c4..60320b9d2 100644 --- a/pd/tkpath/generic/tkCanvPline.c +++ b/pd/tkpath/generic/tkCanvPline.c @@ -6,7 +6,7 @@ * * Copyright (c) 2007-2008 Mats Bengtsson * - * $Id$ + * $Id: tkCanvPline.c,v 1.25 2010/04/30 10:16:00 ebrunel Exp $ */ #include "tkIntPath.h" @@ -25,8 +25,6 @@ typedef struct PlineItem { Tk_PathItemEx headerEx; /* Generic stuff that's the same for all * path types. MUST BE FIRST IN STRUCTURE. */ PathRect coords; /* Coordinates (unorders bare bbox). */ - PathRect totalBbox; /* Bounding box including stroke. - * Untransformed coordinates. */ } PlineItem; @@ -131,7 +129,7 @@ CreatePline(Tcl_Interp *interp, Tk_PathCanvas canvas, struct Tk_PathItem *itemPt itemExPtr->canvas = canvas; itemExPtr->styleObj = NULL; itemExPtr->styleInst = NULL; - plinePtr->totalBbox = NewEmptyPathRect(); + itemPtr->totalBbox = NewEmptyPathRect(); if (optionTable == NULL) { optionTable = Tk_CreateOptionTable(interp, optionSpecs); @@ -214,7 +212,7 @@ PlineCoords(Tcl_Interp *interp, Tk_PathCanvas canvas, Tk_PathItem *itemPtr, int result; result = ProcessCoords(interp, canvas, itemPtr, objc, objv); - if ((result == TCL_OK) && (objc == 1)) { + if ((result == TCL_OK) && ((objc == 1) || (objc == 4))) { ComputePlineBbox(canvas, plinePtr); } return result; @@ -242,8 +240,8 @@ ComputePlineBbox(Tk_PathCanvas canvas, PlineItem *plinePtr) r.x2 = MAX(plinePtr->coords.x1, plinePtr->coords.x2); r.y1 = MIN(plinePtr->coords.y1, plinePtr->coords.y2); r.y2 = MAX(plinePtr->coords.y1, plinePtr->coords.y2); - plinePtr->totalBbox = GetGenericPathTotalBboxFromBare(NULL, &style, &r); - SetGenericPathHeaderBbox(&itemExPtr->header, style.matrixPtr, &plinePtr->totalBbox); + itemPtr->totalBbox = GetGenericPathTotalBboxFromBare(NULL, &style, &r); + SetGenericPathHeaderBbox(&itemExPtr->header, style.matrixPtr, &itemPtr->totalBbox); TkPathCanvasFreeInheritedStyle(&style); } @@ -410,7 +408,7 @@ ScalePline(Tk_PathCanvas canvas, Tk_PathItem *itemPtr, double originX, double or { PlineItem *plinePtr = (PlineItem *) itemPtr; - ScalePathRect(&plinePtr->totalBbox, originX, originY, scaleX, scaleY); + ScalePathRect(&itemPtr->totalBbox, originX, originY, scaleX, scaleY); ScalePathRect(&plinePtr->coords, originX, originY, scaleX, scaleY); ScaleItemHeader(itemPtr, originX, originY, scaleX, scaleY); } @@ -421,7 +419,7 @@ TranslatePline(Tk_PathCanvas canvas, Tk_PathItem *itemPtr, double deltaX, double PlineItem *plinePtr = (PlineItem *) itemPtr; /* Just translate the bbox as well. */ - TranslatePathRect(&plinePtr->totalBbox, deltaX, deltaY); + TranslatePathRect(&itemPtr->totalBbox, deltaX, deltaY); TranslatePathRect(&plinePtr->coords, deltaX, deltaY); TranslateItemHeader(itemPtr, deltaX, deltaY); } diff --git a/pd/tkpath/generic/tkCanvPpoly.c b/pd/tkpath/generic/tkCanvPpoly.c index cca26b657..4fe0f6cce 100644 --- a/pd/tkpath/generic/tkCanvPpoly.c +++ b/pd/tkpath/generic/tkCanvPpoly.c @@ -6,7 +6,7 @@ * * Copyright (c) 2007-2008 Mats Bengtsson * - * $Id$ + * $Id: tkCanvPpoly.c,v 1.25 2010/04/30 10:16:00 ebrunel Exp $ */ #include "tkIntPath.h" @@ -26,10 +26,6 @@ typedef struct PpolyItem { * path types. MUST BE FIRST IN STRUCTURE. */ char type; /* Polyline or polygon. */ PathAtom *atomPtr; - PathRect bbox; /* Bounding box with zero width outline. - * Untransformed coordinates. */ - PathRect totalBbox; /* Bounding box including stroke. - * Untransformed coordinates. */ int maxNumSegments; /* Max number of straight segments (for subpath) * needed for Area and Point functions. */ } PpolyItem; @@ -198,8 +194,8 @@ CreateAny(Tcl_Interp *interp, Tk_PathCanvas canvas, struct Tk_PathItem *itemPtr, itemExPtr->styleInst = NULL; ppolyPtr->atomPtr = NULL; ppolyPtr->type = type; - ppolyPtr->bbox = NewEmptyPathRect(); - ppolyPtr->totalBbox = NewEmptyPathRect(); + itemPtr->bbox = NewEmptyPathRect(); + itemPtr->totalBbox = NewEmptyPathRect(); ppolyPtr->maxNumSegments = 0; if (ppolyPtr->type == kPpolyTypePolyline) { @@ -280,10 +276,10 @@ ComputePpolyBbox(Tk_PathCanvas canvas, PpolyItem *ppolyPtr) return; } style = TkPathCanvasInheritStyle(itemPtr, kPathMergeStyleNotFill); - ppolyPtr->bbox = GetGenericBarePathBbox(ppolyPtr->atomPtr); - ppolyPtr->totalBbox = GetGenericPathTotalBboxFromBare(ppolyPtr->atomPtr, - &style, &ppolyPtr->bbox); - SetGenericPathHeaderBbox(&itemExPtr->header, style.matrixPtr, &ppolyPtr->totalBbox); + itemPtr->bbox = GetGenericBarePathBbox(ppolyPtr->atomPtr); + itemPtr->totalBbox = GetGenericPathTotalBboxFromBare(ppolyPtr->atomPtr, + &style, &itemPtr->bbox); + SetGenericPathHeaderBbox(&itemExPtr->header, style.matrixPtr, &itemPtr->totalBbox); TkPathCanvasFreeInheritedStyle(&style); } @@ -384,7 +380,7 @@ DisplayPpoly(Tk_PathCanvas canvas, Tk_PathItem *itemPtr, Display *display, Drawa style = TkPathCanvasInheritStyle(itemPtr, 0); TkPathDrawPath(Tk_PathCanvasTkwin(canvas), drawable, ppolyPtr->atomPtr, &style, - &m, &ppolyPtr->bbox); + &m, &itemPtr->bbox); TkPathCanvasFreeInheritedStyle(&style); } @@ -440,8 +436,8 @@ ScalePpoly(Tk_PathCanvas canvas, Tk_PathItem *itemPtr, double originX, double or PpolyItem *ppolyPtr = (PpolyItem *) itemPtr; ScalePathAtoms(ppolyPtr->atomPtr, originX, originY, scaleX, scaleY); - ScalePathRect(&ppolyPtr->bbox, originX, originY, scaleX, scaleY); - ScalePathRect(&ppolyPtr->totalBbox, originX, originY, scaleX, scaleY); + ScalePathRect(&itemPtr->bbox, originX, originY, scaleX, scaleY); + ScalePathRect(&itemPtr->totalBbox, originX, originY, scaleX, scaleY); ScaleItemHeader(itemPtr, originX, originY, scaleX, scaleY); } @@ -451,9 +447,9 @@ TranslatePpoly(Tk_PathCanvas canvas, Tk_PathItem *itemPtr, double deltaX, double PpolyItem *ppolyPtr = (PpolyItem *) itemPtr; TranslatePathAtoms(ppolyPtr->atomPtr, deltaX, deltaY); - TranslatePathRect(&ppolyPtr->bbox, deltaX, deltaY); - TranslatePathRect(&ppolyPtr->totalBbox, deltaX, deltaY); - TranslateItemHeader(itemPtr, deltaX, deltaY); + TranslatePathRect(&itemPtr->bbox, deltaX, deltaY); + TranslatePathRect(&itemPtr->totalBbox, deltaX, deltaY); + TranslateItemHeader(itemPtr, deltaX, deltaY); } /* diff --git a/pd/tkpath/generic/tkCanvPrect.c b/pd/tkpath/generic/tkCanvPrect.c index 1e157208a..6ad83bdbf 100644 --- a/pd/tkpath/generic/tkCanvPrect.c +++ b/pd/tkpath/generic/tkCanvPrect.c @@ -6,7 +6,7 @@ * * Copyright (c) 2007-2008 Mats Bengtsson * - * $Id$ + * $Id: tkCanvPrect.c,v 1.28 2010/04/30 10:16:00 ebrunel Exp $ */ #include "tkIntPath.h" @@ -26,10 +26,6 @@ typedef struct PrectItem { * path types. MUST BE FIRST IN STRUCTURE. */ double rx; /* Radius of corners. */ double ry; - PathRect rect; /* Bounding box with zero width outline. - * Untransformed coordinates. */ - PathRect totalBbox; /* Bounding box including stroke. - * Untransformed coordinates. */ int maxNumSegments; /* Max number of straight segments (for subpath) * needed for Area and Point functions. */ } PrectItem; @@ -153,8 +149,8 @@ CreatePrect(Tcl_Interp *interp, Tk_PathCanvas canvas, Tk_PathItem *itemPtr, itemExPtr->canvas = canvas; itemExPtr->styleObj = NULL; itemExPtr->styleInst = NULL; - prectPtr->rect = NewEmptyPathRect(); - prectPtr->totalBbox = NewEmptyPathRect(); + itemPtr->bbox = NewEmptyPathRect(); + itemPtr->totalBbox = NewEmptyPathRect(); prectPtr->maxNumSegments = 100; /* Crude overestimate. */ if (optionTable == NULL) { @@ -172,7 +168,7 @@ CreatePrect(Tcl_Interp *interp, Tk_PathCanvas canvas, Tk_PathItem *itemPtr, break; } } - if (CoordsForRectangularItems(interp, canvas, &prectPtr->rect, i, objv) != TCL_OK) { + if (CoordsForRectangularItems(interp, canvas, &itemPtr->bbox, i, objv) != TCL_OK) { goto error; } if (ConfigurePrect(interp, canvas, itemPtr, objc-i, objv+i, 0) == TCL_OK) { @@ -196,7 +192,7 @@ PrectCoords(Tcl_Interp *interp, Tk_PathCanvas canvas, Tk_PathItem *itemPtr, PrectItem *prectPtr = (PrectItem *) itemPtr; int result; - result = CoordsForRectangularItems(interp, canvas, &prectPtr->rect, objc, objv); + result = CoordsForRectangularItems(interp, canvas, &itemPtr->bbox, objc, objv); if ((result == TCL_OK) && ((objc == 1) || (objc == 4))) { ComputePrectBbox(canvas, prectPtr); } @@ -220,8 +216,8 @@ ComputePrectBbox(Tk_PathCanvas canvas, PrectItem *prectPtr) return; } style = TkPathCanvasInheritStyle(itemPtr, kPathMergeStyleNotFill); - prectPtr->totalBbox = GetGenericPathTotalBboxFromBare(NULL, &style, &prectPtr->rect); - SetGenericPathHeaderBbox(&itemExPtr->header, style.matrixPtr, &prectPtr->totalBbox); + itemPtr->totalBbox = GetGenericPathTotalBboxFromBare(NULL, &style, &itemPtr->bbox); + SetGenericPathHeaderBbox(&itemExPtr->header, style.matrixPtr, &itemPtr->totalBbox); TkPathCanvasFreeInheritedStyle(&style); } @@ -293,13 +289,14 @@ ConfigurePrect(Tcl_Interp *interp, Tk_PathCanvas canvas, Tk_PathItem *itemPtr, static PathAtom * MakePathAtoms(PrectItem *prectPtr) { + Tk_PathItem *itemPtr = (Tk_PathItem *) prectPtr; PathAtom *atomPtr; double points[4]; - points[0] = prectPtr->rect.x1; - points[1] = prectPtr->rect.y1; - points[2] = prectPtr->rect.x2; - points[3] = prectPtr->rect.y2; + points[0] = itemPtr->bbox.x1; + points[1] = itemPtr->bbox.y1; + points[2] = itemPtr->bbox.x2; + points[3] = itemPtr->bbox.y2; TkPathMakePrectAtoms(points, prectPtr->rx, prectPtr->ry, &atomPtr); return atomPtr; } @@ -336,7 +333,7 @@ DisplayPrect(Tk_PathCanvas canvas, Tk_PathItem *itemPtr, Display *display, Drawa style = TkPathCanvasInheritStyle(itemPtr, 0); atomPtr = MakePathAtoms(prectPtr); TkPathDrawPath(Tk_PathCanvasTkwin(canvas), drawable, atomPtr, - &style, &m, &prectPtr->rect); + &style, &m, &itemPtr->bbox); TkPathFreeAtoms(atomPtr); TkPathCanvasFreeInheritedStyle(&style); } @@ -354,7 +351,7 @@ PrectToPoint(Tk_PathCanvas canvas, Tk_PathItem *itemPtr, double *pointPtr) PrectItem *prectPtr = (PrectItem *) itemPtr; Tk_PathStyle style; TMatrix *mPtr; - PathRect *rectPtr = &prectPtr->rect; + PathRect *rectPtr = &itemPtr->bbox; double bareRect[4]; double width, dist; int rectiLinear = 0; @@ -405,7 +402,7 @@ PrectToArea(Tk_PathCanvas canvas, Tk_PathItem *itemPtr, double *areaPtr) Tk_PathItemEx *itemExPtr = &prectPtr->headerEx; Tk_PathStyle style = itemExPtr->style; /* NB: We *copy* the style for temp usage. */ TMatrix *mPtr; - PathRect *rectPtr = &(prectPtr->rect); + PathRect *rectPtr = &(itemPtr->bbox); double bareRect[4]; double width; int rectiLinear = 0; @@ -459,20 +456,20 @@ static void ScalePrect(Tk_PathCanvas canvas, Tk_PathItem *itemPtr, double originX, double originY, double scaleX, double scaleY) { - PrectItem *prectPtr = (PrectItem *) itemPtr; + //PrectItem *prectPtr = (PrectItem *) itemPtr; - ScalePathRect(&prectPtr->rect, originX, originY, scaleX, scaleY); + ScalePathRect(&itemPtr->bbox, originX, originY, scaleX, scaleY); ScaleItemHeader(itemPtr, originX, originY, scaleX, scaleY); } static void TranslatePrect(Tk_PathCanvas canvas, Tk_PathItem *itemPtr, double deltaX, double deltaY) { - PrectItem *prectPtr = (PrectItem *) itemPtr; + //PrectItem *prectPtr = (PrectItem *) itemPtr; /* Just translate the bbox'es as well. */ - TranslatePathRect(&prectPtr->rect, deltaX, deltaY); - TranslatePathRect(&prectPtr->totalBbox, deltaX, deltaY); + TranslatePathRect(&itemPtr->bbox, deltaX, deltaY); + TranslatePathRect(&itemPtr->totalBbox, deltaX, deltaY); TranslateItemHeader(itemPtr, deltaX, deltaY); } diff --git a/pd/tkpath/generic/tkCanvPtext.c b/pd/tkpath/generic/tkCanvPtext.c index fd4fde7cc..0a3d30788 100644 --- a/pd/tkpath/generic/tkCanvPtext.c +++ b/pd/tkpath/generic/tkCanvPtext.c @@ -1,12 +1,12 @@ /* * tkCanvPtext.c -- * - * This file implements a text canvas item modelled after its +486 * This file implements a text canvas item modelled after its * SVG counterpart. See http://www.w3.org/TR/SVG11/. * * Copyright (c) 2007-2008 Mats Bengtsson * - * $Id$ + * $Id: tkCanvPtext.c,v 1.26 2010/04/30 10:16:00 ebrunel Exp $ */ #include "tkIntPath.h" @@ -28,8 +28,6 @@ typedef struct PtextItem { int textAnchor; double x; double y; - PathRect bbox; /* Bounding box with zero width outline. - * Untransformed coordinates. */ Tcl_Obj *utf8Obj; /* The actual text to display; UTF-8 */ int numChars; /* Length of text in characters. */ int numBytes; /* Length of text in bytes. */ @@ -201,7 +199,7 @@ CreatePtext(Tcl_Interp *interp, Tk_PathCanvas canvas, itemExPtr->canvas = canvas; itemExPtr->styleObj = NULL; itemExPtr->styleInst = NULL; - ptextPtr->bbox = NewEmptyPathRect(); + itemPtr->bbox = NewEmptyPathRect(); ptextPtr->utf8Obj = NULL; ptextPtr->numChars = 0; ptextPtr->numBytes = 0; @@ -344,7 +342,7 @@ ComputePtextBbox(Tk_PathCanvas canvas, PtextItem *ptextPtr) bbox.x2 += halfWidth; bbox.x2 += halfWidth; } - ptextPtr->bbox = bbox; + itemPtr->bbox = bbox; SetGenericPathHeaderBbox(&itemExPtr->header, style.matrixPtr, &bbox); TkPathCanvasFreeInheritedStyle(&style); } @@ -485,7 +483,7 @@ DisplayPtext(Tk_PathCanvas canvas, Tk_PathItem *itemPtr, Display *display, Drawa /* @@@ We need to handle gradients as well here! Wait to see what the other APIs have to say. */ - TkPathTextDraw(ctx, &style, &ptextPtr->textStyle, ptextPtr->bbox.x1, ptextPtr->y, + TkPathTextDraw(ctx, &style, &ptextPtr->textStyle, itemPtr->bbox.x1, ptextPtr->y, Tcl_GetString(ptextPtr->utf8Obj), ptextPtr->custom); TkPathEndPath(ctx); TkPathFree(ctx); @@ -508,7 +506,7 @@ PtextToPoint(Tk_PathCanvas canvas, Tk_PathItem *itemPtr, double *pointPtr) style = TkPathCanvasInheritStyle(itemPtr, kPathMergeStyleNotFill | kPathMergeStyleNotStroke); - dist = PathRectToPointWithMatrix(ptextPtr->bbox, style.matrixPtr, pointPtr); + dist = PathRectToPointWithMatrix(itemPtr->bbox, style.matrixPtr, pointPtr); TkPathCanvasFreeInheritedStyle(&style); return dist; } @@ -522,7 +520,7 @@ PtextToArea(Tk_PathCanvas canvas, Tk_PathItem *itemPtr, double *areaPtr) style = TkPathCanvasInheritStyle(itemPtr, kPathMergeStyleNotFill | kPathMergeStyleNotStroke); - area = PathRectToAreaWithMatrix(ptextPtr->bbox, style.matrixPtr, areaPtr); + area = PathRectToAreaWithMatrix(itemPtr->bbox, style.matrixPtr, areaPtr); TkPathCanvasFreeInheritedStyle(&style); return area; } @@ -541,7 +539,7 @@ ScalePtext(Tk_PathCanvas canvas, Tk_PathItem *itemPtr, double originX, double or ptextPtr->x = originX + scaleX*(ptextPtr->x - originX); ptextPtr->y = originY + scaleY*(ptextPtr->y - originY); - ScalePathRect(&ptextPtr->bbox, originX, originY, scaleX, scaleY); + ScalePathRect(&itemPtr->bbox, originX, originY, scaleX, scaleY); ScaleItemHeader(itemPtr, originX, originY, scaleX, scaleY); } @@ -552,7 +550,7 @@ TranslatePtext(Tk_PathCanvas canvas, Tk_PathItem *itemPtr, double deltaX, double ptextPtr->x += deltaX; ptextPtr->y += deltaY; - TranslatePathRect(&ptextPtr->bbox, deltaX, deltaY); + TranslatePathRect(&itemPtr->bbox, deltaX, deltaY); TranslateItemHeader(itemPtr, deltaX, deltaY); } diff --git a/pd/tkpath/generic/tkCanvStyle.c b/pd/tkpath/generic/tkCanvStyle.c index cc5fff767..824ff7dda 100644 --- a/pd/tkpath/generic/tkCanvStyle.c +++ b/pd/tkpath/generic/tkCanvStyle.c @@ -5,7 +5,7 @@ * * Copyright (c) 2008 Mats Bengtsson * - * $Id$ + * $Id: tkCanvStyle.c,v 1.2 2008/06/05 12:51:58 matben Exp $ */ #include "tkIntPath.h" diff --git a/pd/tkpath/generic/tkIntPath.h b/pd/tkpath/generic/tkIntPath.h index 2c5901d6c..790942b3e 100644 --- a/pd/tkpath/generic/tkIntPath.h +++ b/pd/tkpath/generic/tkIntPath.h @@ -5,7 +5,7 @@ * * Copyright (c) 2005-2008 Mats Bengtsson * - * $Id$ + * $Id: tkIntPath.h,v 1.52 2010/04/30 10:16:00 ebrunel Exp $ */ #ifndef INCLUDED_TKINTPATH_H diff --git a/pd/tkpath/generic/tkPath.c b/pd/tkpath/generic/tkPath.c index 64fdfbe5b..f84853162 100644 --- a/pd/tkpath/generic/tkPath.c +++ b/pd/tkpath/generic/tkPath.c @@ -7,7 +7,7 @@ * * Copyright (c) 2005-2008 Mats Bengtsson * - * $Id$ + * $Id: tkPath.c,v 1.18 2012/07/04 19:43:18 petasis Exp $ */ #include "tkIntPath.h" diff --git a/pd/tkpath/generic/tkPath.h b/pd/tkpath/generic/tkPath.h index a8c27946f..216e3c22a 100644 --- a/pd/tkpath/generic/tkPath.h +++ b/pd/tkpath/generic/tkPath.h @@ -6,7 +6,7 @@ * * Copyright (c) 2005-2008 Mats Bengtsson * - * $Id$ + * $Id: tkPath.h,v 1.32 2008/06/14 14:23:25 matben Exp $ */ #ifndef INCLUDED_TKPATH_H @@ -52,13 +52,6 @@ typedef struct PathPoint { double y; } PathPoint; -typedef struct PathRect { - double x1; - double y1; - double x2; - double y2; -} PathRect; - /* * The transformation matrix: * | a b 0 | diff --git a/pd/tkpath/generic/tkPathGradient.c b/pd/tkpath/generic/tkPathGradient.c index 88057adf4..0102d2432 100644 --- a/pd/tkpath/generic/tkPathGradient.c +++ b/pd/tkpath/generic/tkPathGradient.c @@ -8,7 +8,7 @@ * * TODO: o Add tkwin option here and there so we can free stop colors! * - * $Id$ + * $Id: tkPathGradient.c,v 1.4 2012/07/04 19:43:18 petasis Exp $ */ #include "tkIntPath.h" diff --git a/pd/tkpath/generic/tkPathStyle.c b/pd/tkpath/generic/tkPathStyle.c index 37e7ff1c9..ef89e7bee 100644 --- a/pd/tkpath/generic/tkPathStyle.c +++ b/pd/tkpath/generic/tkPathStyle.c @@ -14,7 +14,7 @@ * items are not notified. They will only notice any change when * they need to redisplay. * - * $Id$ + * $Id: tkPathStyle.c,v 1.32 2012/07/04 19:43:18 petasis Exp $ */ #include "tkIntPath.h" diff --git a/pd/tkpath/generic/tkPathStyle.h b/pd/tkpath/generic/tkPathStyle.h index 1721ab3e2..4a122c3a0 100644 --- a/pd/tkpath/generic/tkPathStyle.h +++ b/pd/tkpath/generic/tkPathStyle.h @@ -6,7 +6,7 @@ * * Copyright (c) 2007-2008 Mats Bengtsson * - * $Id$ + * $Id: tkPathStyle.h,v 1.5 2008/06/03 08:08:17 matben Exp $ */ #include "tkIntPath.h" diff --git a/pd/tkpath/generic/tkPathSurface.c b/pd/tkpath/generic/tkPathSurface.c index 45131eee9..2e86d0f43 100644 --- a/pd/tkpath/generic/tkPathSurface.c +++ b/pd/tkpath/generic/tkPathSurface.c @@ -6,7 +6,7 @@ * * Copyright (c) 2007-2008 Mats Bengtsson * - * $Id$ + * $Id: tkPathSurface.c,v 1.28 2012/07/04 19:43:18 petasis Exp $ */ #include "tkIntPath.h" diff --git a/pd/tkpath/generic/tkPathTkDraw.c b/pd/tkpath/generic/tkPathTkDraw.c index d4f0136f9..dc554d5a3 100644 --- a/pd/tkpath/generic/tkPathTkDraw.c +++ b/pd/tkpath/generic/tkPathTkDraw.c @@ -11,7 +11,7 @@ * * Copyright (c) 2005-2008 Mats Bengtsson * - * $Id$ + * $Id: tkPathTkDraw.c,v 1.25 2008/05/22 06:18:21 matben Exp $ */ #include "tkIntPath.h" diff --git a/pd/tkpath/generic/tkPathUtil.c b/pd/tkpath/generic/tkPathUtil.c index d3dedbe03..4f60eb738 100644 --- a/pd/tkpath/generic/tkPathUtil.c +++ b/pd/tkpath/generic/tkPathUtil.c @@ -5,7 +5,7 @@ * * Copyright (c) 2005-2008 Mats Bengtsson * - * $Id$ + * $Id: tkPathUtil.c,v 1.30 2012/07/04 19:43:18 petasis Exp $ */ #include <float.h> @@ -190,6 +190,7 @@ TkPathGetTotalBbox(PathAtom *atomPtr, Tk_PathStyle *stylePtr) { PathRect bare, total; + fprintf(stderr,"TKPathGetTotalBbox\n"); bare = GetGenericBarePathBbox(atomPtr); total = GetGenericPathTotalBboxFromBare(atomPtr, stylePtr, &bare); return total; diff --git a/pd/tkpath/generic/tkp.h b/pd/tkpath/generic/tkp.h index 90571c259..285fafcae 100644 --- a/pd/tkpath/generic/tkp.h +++ b/pd/tkpath/generic/tkp.h @@ -4,7 +4,7 @@ * This file includes stuff from tk.h which we need * in a modified form and to make the tkp::canvas self contained. * - * $Id$ + * $Id: tkp.h,v 1.6 2008/07/16 13:17:33 matben Exp $ */ #ifndef INCLUDED_TKP_H @@ -68,6 +68,13 @@ typedef struct Tk_PathTags { * *tagPtr. */ } Tk_PathTags; +typedef struct PathRect { + double x1; + double y1; + double x2; + double y2; +} PathRect; + typedef struct Tk_PathItem { int id; /* Unique identifier for this item (also * serves as first tag for item). */ @@ -106,6 +113,10 @@ typedef struct Tk_PathItem { * item. Item area includes x1 and y1 but not * x2 and y2. */ Tk_PathState state; /* State of item. */ + PathRect bbox; /* Bounding box with zero width outline. + * Untransformed coordinates. */ + PathRect totalBbox; /* Bounding box including stroke. + * Untransformed coordinates. */ char *reserved1; /* reserved for future use */ int redraw_flags; /* Some flags used in the canvas */ diff --git a/pd/tkpath/generic/tkpCanvArc.c b/pd/tkpath/generic/tkpCanvArc.c index bb70a5c1f..1596540df 100644 --- a/pd/tkpath/generic/tkpCanvArc.c +++ b/pd/tkpath/generic/tkpCanvArc.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$ + * RCS: @(#) $Id: tkpCanvArc.c,v 1.5 2008/07/22 09:41:35 matben Exp $ */ #include <stdio.h> diff --git a/pd/tkpath/generic/tkpCanvBmap.c b/pd/tkpath/generic/tkpCanvBmap.c index 230ae905b..24477f61e 100644 --- a/pd/tkpath/generic/tkpCanvBmap.c +++ b/pd/tkpath/generic/tkpCanvBmap.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$ + * RCS: @(#) $Id: tkpCanvBmap.c,v 1.2 2008/06/21 14:58:42 matben Exp $ */ #include <stdio.h> diff --git a/pd/tkpath/generic/tkpCanvImg.c b/pd/tkpath/generic/tkpCanvImg.c index f18bc9505..65485c63c 100644 --- a/pd/tkpath/generic/tkpCanvImg.c +++ b/pd/tkpath/generic/tkpCanvImg.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$ + * RCS: @(#) $Id: tkpCanvImg.c,v 1.2 2008/06/21 14:58:42 matben Exp $ */ #include <stdio.h> diff --git a/pd/tkpath/generic/tkpCanvLine.c b/pd/tkpath/generic/tkpCanvLine.c index c0d12cf7f..799170b98 100644 --- a/pd/tkpath/generic/tkpCanvLine.c +++ b/pd/tkpath/generic/tkpCanvLine.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$ + * RCS: @(#) $Id: tkpCanvLine.c,v 1.5 2008/07/22 09:41:35 matben Exp $ */ #include <stdio.h> diff --git a/pd/tkpath/generic/tkpCanvPoly.c b/pd/tkpath/generic/tkpCanvPoly.c index bfbc8312d..1d88f3a85 100644 --- a/pd/tkpath/generic/tkpCanvPoly.c +++ b/pd/tkpath/generic/tkpCanvPoly.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$ + * RCS: @(#) $Id: tkpCanvPoly.c,v 1.6 2010/03/10 22:47:37 petasis Exp $ */ #include <stdio.h> diff --git a/pd/tkpath/generic/tkpCanvPs.c b/pd/tkpath/generic/tkpCanvPs.c index 8499c4ba8..8023b83cd 100644 --- a/pd/tkpath/generic/tkpCanvPs.c +++ b/pd/tkpath/generic/tkpCanvPs.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id$ + * RCS: @(#) $Id: tkpCanvPs.c,v 1.3 2012/07/04 19:43:18 petasis Exp $ */ #include "tkInt.h" diff --git a/pd/tkpath/generic/tkpCanvText.c b/pd/tkpath/generic/tkpCanvText.c index eb3e94c32..56cd99b48 100644 --- a/pd/tkpath/generic/tkpCanvText.c +++ b/pd/tkpath/generic/tkpCanvText.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$ + * RCS: @(#) $Id: tkpCanvText.c,v 1.8 2008/07/16 13:17:33 matben Exp $ */ #include <stdio.h> diff --git a/pd/tkpath/generic/tkpCanvUtil.c b/pd/tkpath/generic/tkpCanvUtil.c index 0e928d6ce..5f5f15574 100644 --- a/pd/tkpath/generic/tkpCanvUtil.c +++ b/pd/tkpath/generic/tkpCanvUtil.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$ + * RCS: @(#) $Id: tkpCanvUtil.c,v 1.13 2010/03/10 22:47:37 petasis Exp $ */ #include "tkInt.h" diff --git a/pd/tkpath/generic/tkpCanvWind.c b/pd/tkpath/generic/tkpCanvWind.c index 12cda1150..84be09510 100644 --- a/pd/tkpath/generic/tkpCanvWind.c +++ b/pd/tkpath/generic/tkpCanvWind.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$ + * RCS: @(#) $Id: tkpCanvWind.c,v 1.4 2008/07/14 08:21:26 matben Exp $ */ #include <stdio.h> diff --git a/pd/tkpath/generic/tkpCanvas.c b/pd/tkpath/generic/tkpCanvas.c index f726280cd..9c80e3ba4 100644 --- a/pd/tkpath/generic/tkpCanvas.c +++ b/pd/tkpath/generic/tkpCanvas.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id$ + * RCS: @(#) $Id: tkpCanvas.c,v 1.16 2012/07/04 19:43:18 petasis Exp $ */ /* #define USE_OLD_TAG_SEARCH 1 */ @@ -1074,8 +1074,8 @@ CanvasWidgetCmd( char *arg; int length; - if (objc < 3) { - Tcl_WrongNumArgs(interp, 2, objv, "type coords ?arg arg ...?"); + if (objc < 2) { + Tcl_WrongNumArgs(interp, 1, objv, "type ?arg arg ...?"); result = TCL_ERROR; goto done; } diff --git a/pd/tkpath/generic/tkpCanvas.h b/pd/tkpath/generic/tkpCanvas.h index 061e290e1..2402e1c5f 100644 --- a/pd/tkpath/generic/tkpCanvas.h +++ b/pd/tkpath/generic/tkpCanvas.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id$ + * RCS: @(#) $Id: tkpCanvas.h,v 1.10 2008/07/23 07:08:39 matben Exp $ */ #ifndef _TKPCANVAS diff --git a/pd/tkpath/generic/tkpRectOval.c b/pd/tkpath/generic/tkpRectOval.c index 3900aa68d..f53923cc7 100644 --- a/pd/tkpath/generic/tkpRectOval.c +++ b/pd/tkpath/generic/tkpRectOval.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$ + * RCS: @(#) $Id: tkpRectOval.c,v 1.6 2008/07/22 09:41:35 matben Exp $ */ #include <stdio.h> diff --git a/pd/tkpath/generic/tkpTrig.c b/pd/tkpath/generic/tkpTrig.c index 9d8faba56..35d8369b2 100644 --- a/pd/tkpath/generic/tkpTrig.c +++ b/pd/tkpath/generic/tkpTrig.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id$ + * RCS: @(#) $Id: tkpTrig.c,v 1.2 2008/06/05 14:39:49 matben Exp $ */ /* diff --git a/pd/tkpath/generic/tkpUtil.c b/pd/tkpath/generic/tkpUtil.c index d8ab9744e..bf0106458 100644 --- a/pd/tkpath/generic/tkpUtil.c +++ b/pd/tkpath/generic/tkpUtil.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$ + * RCS: @(#) $Id: tkpUtil.c,v 1.7 2012/07/04 19:43:18 petasis Exp $ */ #include "tkInt.h" -- GitLab