summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXDraw.c
diff options
context:
space:
mode:
authordas <das>2006-04-11 10:20:37 (GMT)
committerdas <das>2006-04-11 10:20:37 (GMT)
commite976b2767a0b00ee61b26d7d65eb37b38c4d4623 (patch)
tree9c11a8593b1cefd2deed0ad602b10701fd1885e8 /macosx/tkMacOSXDraw.c
parent25e939e6af367ad7192df73d73ae0e43e8ba86df (diff)
downloadtk-e976b2767a0b00ee61b26d7d65eb37b38c4d4623.zip
tk-e976b2767a0b00ee61b26d7d65eb37b38c4d4623.tar.gz
tk-e976b2767a0b00ee61b26d7d65eb37b38c4d4623.tar.bz2
* macosx/tkMacOSXDraw.c (TkMacOSXInitCGDrawing): prevent multiple init.
Diffstat (limited to 'macosx/tkMacOSXDraw.c')
-rw-r--r--macosx/tkMacOSXDraw.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c
index 917e3c7..f63f2d8 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.12 2006/03/28 02:44:13 das Exp $
+ * RCS: @(#) $Id: tkMacOSXDraw.c,v 1.2.2.13 2006/04/11 10:20:37 das Exp $
*/
#include "tkMacOSXInt.h"
@@ -47,9 +47,9 @@ static int useThemedFrame = 0;
static unsigned char InvertByte _ANSI_ARGS_((unsigned char data));
static void TkMacOSXSetUpCGContext(MacDrawable *macWin,
- CGrafPtr destPort, GC gc, CGContextRef *contextPtr);
+ CGrafPtr destPort, GC gc, CGContextRef *contextPtr);
static void TkMacOSXReleaseCGContext(MacDrawable *macWin, CGrafPtr destPort,
- CGContextRef *context);
+ CGContextRef *context);
static inline double radians(double degrees) { return degrees * PI / 180.0f; }
int
@@ -61,19 +61,19 @@ TkMacOSXInitCGDrawing(interp, enable, limit)
static Boolean initialized = FALSE;
if (!initialized) {
+ initialized = TRUE;
+
if (Tcl_CreateNamespace(interp, "::tk::mac", NULL, NULL) == NULL) {
Tcl_ResetResult(interp);
}
if (Tcl_LinkVar(interp, "::tk::mac::useCGDrawing",
- (char *) &useCGDrawing,
- TCL_LINK_BOOLEAN) != TCL_OK) {
+ (char *) &useCGDrawing, TCL_LINK_BOOLEAN) != TCL_OK) {
Tcl_ResetResult(interp);
}
useCGDrawing = enable;
if (Tcl_LinkVar(interp, "::tk::mac::CGAntialiasLimit",
- (char *) &tkMacOSXCGAntiAliasLimit,
- TCL_LINK_INT) != TCL_OK) {
+ (char *) &tkMacOSXCGAntiAliasLimit, TCL_LINK_INT) != TCL_OK) {
Tcl_ResetResult(interp);
}
tkMacOSXCGAntiAliasLimit = limit;