* Source/cairo/CairoGState.m

(-compositeGState:fromRect:toPoint:op:fraction:): Move the usage
of _ct and source->_ct after the check whether they are set.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@30588 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2010-06-06 19:56:35 +00:00
parent 9995a94236
commit c58eb7c207
2 changed files with 16 additions and 5 deletions

View file

@ -1,3 +1,9 @@
2010-06-06 Fred Kiefer <FredKiefer@gmx.de>
* Source/cairo/CairoGState.m
(-compositeGState:fromRect:toPoint:op:fraction:): Move the usage
of _ct and source->_ct after the check whether they are set.
2010-06-01 Quentin Mathe <quentin.mathe@gmail.com>
Fixed composite operator to behave correctly and added a new draw

View file

@ -1268,9 +1268,9 @@ _set_op(cairo_t *ct, NSCompositingOperation op)
op: (NSCompositingOperation)op
fraction: (float)delta
{
cairo_surface_t *src = cairo_get_target(source->_ct);
cairo_surface_t *src;
NSSize ssize = NSZeroSize;
BOOL copyOnSelf = (src == cairo_get_target(_ct));
BOOL copyOnSelf;
/* The source rect in the source base coordinate space.
This rect is the minimum bounding rect of srcRect. */
NSRect srcRectInBase = NSZeroRect;
@ -1283,11 +1283,11 @@ _set_op(cairo_t *ct, NSCompositingOperation op)
/* The adjusted destination point in the target base coordinate space */
double x, y;
/* Alternative source rect origin in the source current CTM */
NSPoint srcRectAltOrigin = NSMakePoint(srcRect.origin.x, srcRect.origin.y + srcRect.size.height);
NSPoint srcRectAltOrigin;
/* Alternative source rect origin in the source base coordinate space */
NSPoint srcRectAltOriginInBase = [source->ctm transformPoint: srcRectAltOrigin];
NSPoint srcRectAltOriginInBase;
/* The source rect origin in the source base coordinate space */
NSPoint srcRectOriginInBase = [source->ctm transformPoint: srcRect.origin];
NSPoint srcRectOriginInBase;
BOOL originFlippedBetweenBaseAndSource = NO;
/* The delta between the origins of srcRect and srcRectInBase */
double dx, dy;
@ -1300,6 +1300,11 @@ _set_op(cairo_t *ct, NSCompositingOperation op)
}
//NSLog(@"Composite surface %p source size %@ target size %@", self->_surface, NSStringFromSize([self->_surface size]), NSStringFromSize([source->_surface size]));
src = cairo_get_target(source->_ct);
copyOnSelf = (src == cairo_get_target(_ct));
srcRectAltOrigin = NSMakePoint(srcRect.origin.x, srcRect.origin.y + srcRect.size.height);
srcRectAltOriginInBase = [source->ctm transformPoint: srcRectAltOrigin];
srcRectOriginInBase = [source->ctm transformPoint: srcRect.origin];
cairo_save(_ct);