diff options
author | dgp <dgp@users.sourceforge.net> | 2007-07-03 02:28:13 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2007-07-03 02:28:13 (GMT) |
commit | 7a759b769c9ef7bed1085c243c8eafdb5f357726 (patch) | |
tree | b17107dec8fc1334cc0f8c62703e48c49343617f | |
parent | f033a80514181e8c3c72adf49910b036334ece31 (diff) | |
download | tk-7a759b769c9ef7bed1085c243c8eafdb5f357726.zip tk-7a759b769c9ef7bed1085c243c8eafdb5f357726.tar.gz tk-7a759b769c9ef7bed1085c243c8eafdb5f357726.tar.bz2 |
merge updates from HEAD
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | macosx/tkMacOSXColor.c | 8 | ||||
-rw-r--r-- | macosx/tkMacOSXDraw.c | 4 | ||||
-rw-r--r-- | xlib/xgc.c | 8 |
4 files changed, 23 insertions, 7 deletions
@@ -1,3 +1,13 @@ +2007-07-02 Daniel Steffen <das@users.sourceforge.net> + + * xlib/xgc.c (XCreateGC): correct black and white pixel values used to + initialize GC foregrund and background fields. + + * macosx/tkMacOSXColor.c: add debug messages for unknown pixel values. + + * macosx/tkMacOSXDraw.c (TkMacOSXRestoreDrawingContext): don't restore + port state if it wasn't altered by TkMacOSXSetupDrawingContext(). + 2007-06-29 Daniel Steffen <das@users.sourceforge.net> * xlib/ximage.c: bitmaps created from the static .xbm diff --git a/macosx/tkMacOSXColor.c b/macosx/tkMacOSXColor.c index ab8b266..276e161 100644 --- a/macosx/tkMacOSXColor.c +++ b/macosx/tkMacOSXColor.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: tkMacOSXColor.c,v 1.8.2.3 2007/07/01 17:31:32 dgp Exp $ + * RCS: @(#) $Id: tkMacOSXColor.c,v 1.8.2.4 2007/07/03 02:28:13 dgp Exp $ */ #include "tkMacOSXPrivate.h" @@ -300,7 +300,7 @@ TkSetMacColor( * * TkMacOSXSetColorInPort -- * - * Sets fore or back color in the current QD port from an X pixel + * Sets fore or back color in the given QD port from an X pixel * value, and if the pixel code indicates a system color, sets * the corresponding brush, textColor or background via * Appearance mgr APIs. @@ -367,6 +367,8 @@ TkMacOSXSetColorInPort( if (portChanged) { QDSwapPort(savePort, NULL); } + } else { + TkMacOSXDbgMsg("Ignored unknown pixel value 0x%lx", pixel); } if (penPat && !setPenPat) { GetPortBackPixPat(port, penPat); @@ -521,6 +523,8 @@ TkMacOSXSetColorInContext( } else if (((pixel >> 24) & 0xff) == TRANSPARENT_PIXEL) { CGContextSetRGBFillColor(context, 0.0, 0.0, 0.0, 0.0); CGContextSetRGBStrokeColor(context, 0.0, 0.0, 0.0, 0.0); + } else { + TkMacOSXDbgMsg("Ignored unknown pixel value 0x%lx", pixel); } } diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c index b6d8f6c..425ea5e 100644 --- a/macosx/tkMacOSXDraw.c +++ b/macosx/tkMacOSXDraw.c @@ -12,7 +12,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.21.2.5 2007/07/01 17:31:32 dgp Exp $ + * RCS: @(#) $Id: tkMacOSXDraw.c,v 1.21.2.6 2007/07/03 02:28:14 dgp Exp $ */ #include "tkMacOSXPrivate.h" @@ -1630,7 +1630,7 @@ TkMacOSXRestoreDrawingContext(TkMacOSXDrawingContext *dc) if (dc->port) { ChkErr(QDEndCGContext, dc->port, &(dc->context)); } - } else { + } else if (dc->port) { if (!tkPictureIsOpen) { HidePen(); } @@ -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: xgc.c,v 1.11.2.1 2007/05/30 13:47:43 dgp Exp $ + * RCS: @(#) $Id: xgc.c,v 1.11.2.2 2007/07/03 02:28:14 dgp Exp $ */ #include <tkInt.h> @@ -68,8 +68,10 @@ XCreateGC( InitField(function, GCFunction, GXcopy); InitField(plane_mask, GCPlaneMask, (unsigned long)(~0)); - InitField(foreground, GCForeground, 0); - InitField(background, GCBackground, 0xffffff); + InitField(foreground, GCForeground, + BlackPixelOfScreen(DefaultScreenOfDisplay(display))); + InitField(background, GCBackground, + WhitePixelOfScreen(DefaultScreenOfDisplay(display))); InitField(line_width, GCLineWidth, 1); InitField(line_style, GCLineStyle, LineSolid); InitField(cap_style, GCCapStyle, 0); |