mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-24 04:11:28 +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>
|
2007-03-21 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Source/cairo/CairoGState.m: General clean-up and optimisation of
|
* 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);
|
src = cairo_get_target(source->_ct);
|
||||||
if (src == cairo_get_target(_ct))
|
if (src == cairo_get_target(_ct))
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
NSRect targetRect;
|
NSRect targetRect;
|
||||||
|
|
||||||
targetRect.origin = aPoint;
|
targetRect.origin = aPoint;
|
||||||
|
@ -956,18 +957,24 @@ _set_op(cairo_t *ct, NSCompositingOperation op)
|
||||||
|
|
||||||
if (!NSIsEmptyRect(NSIntersectionRect(aRect, targetRect)))
|
if (!NSIsEmptyRect(NSIntersectionRect(aRect, targetRect)))
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
NSLog(@"Copy onto self");
|
NSLog(@"Copy onto self");
|
||||||
NSLog(NSStringFromRect(aRect));
|
NSLog(NSStringFromRect(aRect));
|
||||||
NSLog(NSStringFromPoint(aPoint));
|
NSLog(NSStringFromPoint(aPoint));
|
||||||
NSLog(@"src %p(%p,%@) des %p(%p,%@)",
|
NSLog(@"src %p(%p,%@) des %p(%p,%@)",
|
||||||
source,cairo_get_target(source->_ct),NSStringFromSize([source->_surface size]),
|
source,cairo_get_target(source->_ct),NSStringFromSize([source->_surface size]),
|
||||||
self,cairo_get_target(_ct),NSStringFromSize([_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];
|
aPoint = [ctm pointInMatrixSpace: aPoint];
|
||||||
|
|
||||||
x = aPoint.x;
|
x = aPoint.x;
|
||||||
|
@ -976,6 +983,7 @@ _set_op(cairo_t *ct, NSCompositingOperation op)
|
||||||
miny = NSMinY(aRect);
|
miny = NSMinY(aRect);
|
||||||
width = NSWidth(aRect);
|
width = NSWidth(aRect);
|
||||||
height = NSHeight(aRect);
|
height = NSHeight(aRect);
|
||||||
|
|
||||||
if (source->_surface != nil)
|
if (source->_surface != nil)
|
||||||
{
|
{
|
||||||
ssize = [source->_surface size];
|
ssize = [source->_surface size];
|
||||||
|
|
Loading…
Reference in a new issue