From 5f7ea64199bf225dcb9c788692db8d4853f9191d Mon Sep 17 00:00:00 2001 From: Marcian Lytwyn Date: Wed, 8 Aug 2012 22:23:43 +0000 Subject: [PATCH] Cairo win32 fixes git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@35370 72102866-910b-0410-8b05-ffd578937521 --- Source/cairo/CairoGState.m | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Source/cairo/CairoGState.m b/Source/cairo/CairoGState.m index 6232860..5083d60 100644 --- a/Source/cairo/CairoGState.m +++ b/Source/cairo/CairoGState.m @@ -1,3 +1,4 @@ + /* CairoGState.m @@ -38,6 +39,7 @@ #include "cairo/CairoContext.h" #include +#include "win32/WIN32Server.h" // Macro stolen from base/Header/Additions/GNUstepBase/GSObjRuntime.h #ifndef GS_MAX_OBJECTS_FROM_STACK @@ -122,6 +124,14 @@ static inline float floatToUserSpace(NSAffineTransform *ctm, double d) [super dealloc]; } +- (NSString*) description +{ + NSMutableString *description = [[super description] mutableCopy]; + [description appendFormat: @" surface: %@",_surface]; + [description appendFormat: @" context: %p",_ct]; + return [description copy]; +} + - (id) copyWithZone: (NSZone *)zone { CairoGState *copy = (CairoGState *)[super copyWithZone: zone]; @@ -1250,6 +1260,8 @@ _set_op(cairo_t *ct, NSCompositingOperation op) cairo_pattern_t *cpattern; cairo_matrix_t source_matrix; + NSDebugLLog(@"CairoGState", @"%s:self: %@\n", __PRETTY_FUNCTION__, self); + if (!_ct || !source->_ct) { return; @@ -1372,6 +1384,11 @@ doesn't support to use the receiver cairo target as the source. */ cairo_matrix_t local_matrix; cairo_matrix_t source_matrix; + NSDebugLLog(@"CairoGState", @"%s - source: %@ fromRect: %@ toPoint: %@\n", __PRETTY_FUNCTION__, + source, + NSStringFromRect(aRect), + NSStringFromPoint(aPoint)); + if (!_ct || !source->_ct) { NSLog(@"WARNING: -drawGState called with a NULL target context (%p) or source context (%p)",