From 42ad4e15c28ba0952715b1cb1d341f58f150618a Mon Sep 17 00:00:00 2001 From: das Date: Tue, 27 Jul 2004 18:58:32 +0000 Subject: * generic/tkRectOval.c (ComputeRectOvalBbox): Mac OS X specific fix to rounding in bounding box 'bloat' calculation to avoid drawing outside of bounding box when CG drawing enabled. Fix probably correct on other platforms as well? * macosx/tkMacOSXDraw.c (TkMacOSXInitCGDrawing): fixed LinkVar type for tkMacOSXCGAntiAliasLimit. --- ChangeLog | 12 +++++++++++- generic/tkRectOval.c | 9 ++++++++- macosx/tkMacOSXDraw.c | 4 ++-- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9731059..2bea583 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,17 @@ -2004-07-26 Jeff Hobbs +2004-07-27 Daniel Steffen *** 8.4.7 TAGGED FOR RELEASE *** + * generic/tkRectOval.c (ComputeRectOvalBbox): Mac OS X specific + fix to rounding in bounding box 'bloat' calculation to avoid drawing + outside of bounding box when CG drawing enabled. Fix probably + correct on other platforms as well? + + * macosx/tkMacOSXDraw.c (TkMacOSXInitCGDrawing): fixed LinkVar type + for tkMacOSXCGAntiAliasLimit. + +2004-07-26 Jeff Hobbs + * changes: Updated for Tcl 8.4.7 release. 2004-07-24 Jim Ingham diff --git a/generic/tkRectOval.c b/generic/tkRectOval.c index 59d233f..636b4ba 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.10 2003/02/09 07:48:22 hobbs Exp $ + * RCS: @(#) $Id: tkRectOval.c,v 1.10.2.1 2004/07/27 18:58:33 das Exp $ */ #include @@ -672,7 +672,14 @@ ComputeRectOvalBbox(canvas, rectOvalPtr) bloat = 0; #endif } else { +#ifdef MAC_OSX_TK + /* Mac OS X CoreGraphics needs correct rounding here + * otherwise it will draw outside the bounding box. + * Probably correct on other platforms as well? */ + bloat = (int) (width+1.5)/2; +#else bloat = (int) (width+1)/2; +#endif } /* diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c index dec2369..e4d6431 100644 --- a/macosx/tkMacOSXDraw.c +++ b/macosx/tkMacOSXDraw.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: tkMacOSXDraw.c,v 1.2.2.3 2004/07/25 02:19:22 wolfsuit Exp $ + * RCS: @(#) $Id: tkMacOSXDraw.c,v 1.2.2.4 2004/07/27 18:58:33 das Exp $ */ #include "tclInt.h" @@ -76,7 +76,7 @@ TkMacOSXInitCGDrawing(interp, enable, limit) if (Tcl_LinkVar(interp, "::tk::mac::CGAntialiasLimit", (char *) &tkMacOSXCGAntiAliasLimit, - TCL_LINK_BOOLEAN) != TCL_OK) { + TCL_LINK_INT) != TCL_OK) { Tcl_ResetResult(interp); } tkMacOSXCGAntiAliasLimit = limit; -- cgit v0.12