diff --git a/ChangeLog b/ChangeLog index 3ec8a35..9ce4091 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-07-10 Fred Kiefer + + * Source/cairo/CairoGState.m + (-compositeGState:fromRect:toPoint:op:fraction:): Add hack to + avoid scrolling problem for cairo > 1.8. + 2009-05-31 Fred Kiefer * Source/x11/XWindowBuffer.m: Protect the XSHM code parts with diff --git a/Source/cairo/CairoGState.m b/Source/cairo/CairoGState.m index 24e674f..aa07834 100644 --- a/Source/cairo/CairoGState.m +++ b/Source/cairo/CairoGState.m @@ -1288,6 +1288,14 @@ _set_op(cairo_t *ct, NSCompositingOperation op) [source->ctm boundingRectFor: aRect result: &aRect]; + if ((copyOnSelf) && (cairo_version() >= CAIRO_VERSION_ENCODE(1, 8, 0))) + { + NSSize size = [_surface size]; + + // For cairo > 1.8 we seem to need this adjustment + aRect.origin.y -= 2*(offset.y - size.height); + } + x = floorf(aPoint.x); y = floorf(aPoint.y + 0.5); minx = NSMinX(aRect);