diff options
author | das <das> | 2004-09-18 00:48:13 (GMT) |
---|---|---|
committer | das <das> | 2004-09-18 00:48:13 (GMT) |
commit | 55367d23bd8aae102201a7dfe33e6174bce85381 (patch) | |
tree | 2644046be4778867c8e5d56c566bbffbea03d87b | |
parent | fe6f55842ee8bac755f000d6829ba15b29e5d645 (diff) | |
download | tk-55367d23bd8aae102201a7dfe33e6174bce85381.zip tk-55367d23bd8aae102201a7dfe33e6174bce85381.tar.gz tk-55367d23bd8aae102201a7dfe33e6174bce85381.tar.bz2 |
* macosx/README: typos
* macosx/tkMacOSXDraw.c (TkMacOSXSetUpCGContext): performance
improvements: removed slow & unnecessary calls.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | macosx/README | 5 | ||||
-rw-r--r-- | macosx/tkMacOSXDraw.c | 18 |
3 files changed, 18 insertions, 11 deletions
@@ -1,3 +1,9 @@ +2004-09-18 Daniel Steffen <das@users.sourceforge.net> + + * macosx/README: typos + * macosx/tkMacOSXDraw.c (TkMacOSXSetUpCGContext): performance + improvements: removed slow & unnecessary calls. + 2004-09-17 Jeff Hobbs <jeffh@ActiveState.com> * tests/winWm.test: Add 'wm attributes -alpha' to control toplevel diff --git a/macosx/README b/macosx/README index 14d66d0..eff9032 100644 --- a/macosx/README +++ b/macosx/README @@ -1,7 +1,7 @@ TclTkAqua README ---------------- -RCS: @(#) $Id: README,v 1.6.2.5 2004/07/27 18:52:26 wolfsuit Exp $ +RCS: @(#) $Id: README,v 1.6.2.6 2004/09/18 00:48:14 das Exp $ This is the README file for the Mac OS X native versions of Tcl & Tk. @@ -100,7 +100,8 @@ is set to 3 pixel width lines. You can change this if you want by putting: set tk::mac::CGAntialiasLimit <limit> -in your script before drawing, in which case only lines thinner that <limit> pixels will be antialiased. +in your script before drawing, in which case only lines thinner that <limit> pixels +will not be antialiased. - Quickdraw text antialiasing is enabled by default when available (from 10.1.5 onwards). Changing the global boolean variable '::tk::mac::antialiasedtext' diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c index e4d6431..81d36aa 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.4 2004/07/27 18:58:33 das Exp $ + * RCS: @(#) $Id: tkMacOSXDraw.c,v 1.2.2.5 2004/09/18 00:48:14 das Exp $ */ #include "tclInt.h" @@ -1723,11 +1723,10 @@ TkMacOSXSetUpCGContext( OSStatus err; Rect boundsRect; CGAffineTransform coordsTransform; - RgnHandle clipRgn; + static RgnHandle clipRgn = NULL; err = QDBeginCGContext(destPort, contextPtr); outContext = *contextPtr; - CGContextSaveGState(outContext); /* * Now clip the CG Context to the port. Note, we have already @@ -1739,15 +1738,17 @@ TkMacOSXSetUpCGContext( * visible region so we don't overwrite the window decoration. */ - clipRgn = NewRgn(); - GetPortClipRegion(destPort, clipRgn); - - SectRegionWithPortVisibleRegion(destPort, clipRgn); + if (!clipRgn) { + clipRgn = NewRgn(); + } GetPortBounds(destPort, &boundsRect); + RectRgn(clipRgn, &boundsRect); + SectRegionWithPortClipRegion(destPort, clipRgn); + SectRegionWithPortVisibleRegion(destPort, clipRgn); ClipCGContextToRegion(outContext, &boundsRect, clipRgn); - DisposeRgn(clipRgn); + SetEmptyRgn(clipRgn); /* * Note: You have to call SyncCGContextOriginWithPort @@ -1823,7 +1824,6 @@ TkMacOSXReleaseCGContext( CGrafPtr destPort, CGContextRef *outContext) { - CGContextRestoreGState(*outContext); CGContextSynchronize(*outContext); QDEndCGContext(destPort, outContext); } |