mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-23 11:51:27 +00:00
Small improvement of cairo composite for rotated case.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@24918 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
4fadeaf154
commit
3ab2c8bd91
2 changed files with 17 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
|||
2007-03-22 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/cairo/CairoGState.m (-compositeGState:...fraction:):
|
||||
Correct computation of source rectangle and add flip correction.
|
||||
The later is currently commented out.
|
||||
|
||||
2007-03-21 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/cairo/CairoGState.m: General clean-up and optimisation of
|
||||
|
|
|
@ -949,6 +949,7 @@ _set_op(cairo_t *ct, NSCompositingOperation op)
|
|||
src = cairo_get_target(source->_ct);
|
||||
if (src == cairo_get_target(_ct))
|
||||
{
|
||||
/*
|
||||
NSRect targetRect;
|
||||
|
||||
targetRect.origin = aPoint;
|
||||
|
@ -956,18 +957,24 @@ _set_op(cairo_t *ct, NSCompositingOperation op)
|
|||
|
||||
if (!NSIsEmptyRect(NSIntersectionRect(aRect, targetRect)))
|
||||
{
|
||||
/*
|
||||
NSLog(@"Copy onto self");
|
||||
NSLog(NSStringFromRect(aRect));
|
||||
NSLog(NSStringFromPoint(aPoint));
|
||||
NSLog(@"src %p(%p,%@) des %p(%p,%@)",
|
||||
source,cairo_get_target(source->_ct),NSStringFromSize([source->_surface size]),
|
||||
self,cairo_get_target(_ct),NSStringFromSize([_surface size]));
|
||||
*/
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
aRect = [source->ctm rectInMatrixSpace: aRect];
|
||||
/*
|
||||
With this bit of code enable scrolling works correctly, but images in cells get displayed wrongly.
|
||||
if (viewIsFlipped)
|
||||
{
|
||||
aPoint.y += NSHeight(aRect);
|
||||
}
|
||||
*/
|
||||
[source->ctm boundingRectFor: aRect result: &aRect];
|
||||
aPoint = [ctm pointInMatrixSpace: aPoint];
|
||||
|
||||
x = aPoint.x;
|
||||
|
@ -976,6 +983,7 @@ _set_op(cairo_t *ct, NSCompositingOperation op)
|
|||
miny = NSMinY(aRect);
|
||||
width = NSWidth(aRect);
|
||||
height = NSHeight(aRect);
|
||||
|
||||
if (source->_surface != nil)
|
||||
{
|
||||
ssize = [source->_surface size];
|
||||
|
|
Loading…
Reference in a new issue