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
This commit is contained in:
Marcian Lytwyn 2012-08-08 22:23:43 +00:00
parent 110201169d
commit 5f7ea64199

View file

@ -1,3 +1,4 @@
/* /*
CairoGState.m CairoGState.m
@ -38,6 +39,7 @@
#include "cairo/CairoContext.h" #include "cairo/CairoContext.h"
#include <math.h> #include <math.h>
#include "win32/WIN32Server.h"
// Macro stolen from base/Header/Additions/GNUstepBase/GSObjRuntime.h // Macro stolen from base/Header/Additions/GNUstepBase/GSObjRuntime.h
#ifndef GS_MAX_OBJECTS_FROM_STACK #ifndef GS_MAX_OBJECTS_FROM_STACK
@ -122,6 +124,14 @@ static inline float floatToUserSpace(NSAffineTransform *ctm, double d)
[super dealloc]; [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 - (id) copyWithZone: (NSZone *)zone
{ {
CairoGState *copy = (CairoGState *)[super copyWithZone: zone]; CairoGState *copy = (CairoGState *)[super copyWithZone: zone];
@ -1250,6 +1260,8 @@ _set_op(cairo_t *ct, NSCompositingOperation op)
cairo_pattern_t *cpattern; cairo_pattern_t *cpattern;
cairo_matrix_t source_matrix; cairo_matrix_t source_matrix;
NSDebugLLog(@"CairoGState", @"%s:self: %@\n", __PRETTY_FUNCTION__, self);
if (!_ct || !source->_ct) if (!_ct || !source->_ct)
{ {
return; 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 local_matrix;
cairo_matrix_t source_matrix; cairo_matrix_t source_matrix;
NSDebugLLog(@"CairoGState", @"%s - source: %@ fromRect: %@ toPoint: %@\n", __PRETTY_FUNCTION__,
source,
NSStringFromRect(aRect),
NSStringFromPoint(aPoint));
if (!_ct || !source->_ct) if (!_ct || !source->_ct)
{ {
NSLog(@"WARNING: -drawGState called with a NULL target context (%p) or source context (%p)", NSLog(@"WARNING: -drawGState called with a NULL target context (%p) or source context (%p)",