mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 15:11:37 +00:00
Exchanged appendTransform: and prePendTransform:
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18479 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3c2b36c17f
commit
0285ceb796
4 changed files with 32 additions and 23 deletions
|
@ -1,3 +1,12 @@
|
|||
2004-01-25 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSAffineTransform.m: Exchanged the code of
|
||||
appendTransform: and prePendTransform: to be Cocoa compatibile.
|
||||
(-concatenateWith:) replaced appendTransform: with prependTransform:.
|
||||
* Source/NSPrintOperation.m: (NSView
|
||||
-_displayPageInRect:atPlacement:withInfo:) Item.
|
||||
* Source/NSView.m (+initialize, -_rebuildCoordinates) Item.
|
||||
|
||||
2004-01-25 16:16 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Source/NSStringDrawing.m: Big redesign.
|
||||
|
|
|
@ -96,12 +96,12 @@ static NSAffineTransformStruct identityTransform = {
|
|||
{
|
||||
float newA, newB, newC, newD, newTX, newTY;
|
||||
|
||||
newA = aTransform->A * A + aTransform->B * C;
|
||||
newB = aTransform->A * B + aTransform->B * D;
|
||||
newC = aTransform->C * A + aTransform->D * C;
|
||||
newD = aTransform->C * B + aTransform->D * D;
|
||||
newTX = aTransform->TX * A + aTransform->TY * C + TX;
|
||||
newTY = aTransform->TX * B + aTransform->TY * D + TY;
|
||||
newA = A * aTransform->A + B * aTransform->C;
|
||||
newB = A * aTransform->B + B * aTransform->D;
|
||||
newC = C * aTransform->A + D * aTransform->C;
|
||||
newD = C * aTransform->B + D * aTransform->D;
|
||||
newTX = TX * aTransform->A + TY * aTransform->C + aTransform->TX;
|
||||
newTY = TX * aTransform->B + TY * aTransform->D + aTransform->TY;
|
||||
|
||||
A = newA; B = newB;
|
||||
C = newC; D = newD;
|
||||
|
@ -182,12 +182,12 @@ static NSAffineTransformStruct identityTransform = {
|
|||
{
|
||||
float newA, newB, newC, newD, newTX, newTY;
|
||||
|
||||
newA = A * aTransform->A + B * aTransform->C;
|
||||
newB = A * aTransform->B + B * aTransform->D;
|
||||
newC = C * aTransform->A + D * aTransform->C;
|
||||
newD = C * aTransform->B + D * aTransform->D;
|
||||
newTX = TX * aTransform->A + TY * aTransform->C + aTransform->TX;
|
||||
newTY = TX * aTransform->B + TY * aTransform->D + aTransform->TY;
|
||||
newA = aTransform->A * A + aTransform->B * C;
|
||||
newB = aTransform->A * B + aTransform->B * D;
|
||||
newC = aTransform->C * A + aTransform->D * C;
|
||||
newD = aTransform->C * B + aTransform->D * D;
|
||||
newTX = aTransform->TX * A + aTransform->TY * C + TX;
|
||||
newTY = aTransform->TX * B + aTransform->TY * D + TY;
|
||||
|
||||
A = newA; B = newB;
|
||||
C = newC; D = newD;
|
||||
|
@ -444,7 +444,7 @@ static NSAffineTransformStruct identityTransform = {
|
|||
|
||||
- (void) concatenateWith: (NSAffineTransform*)anotherMatrix
|
||||
{
|
||||
[self appendTransform: anotherMatrix];
|
||||
[self prependTransform: anotherMatrix];
|
||||
}
|
||||
|
||||
- (void) concatenateWithMatrix: (const float[6])anotherMatrix
|
||||
|
|
|
@ -1062,14 +1062,14 @@ scaleRect(NSRect rect, double scale)
|
|||
flip = [NSAffineTransform new];
|
||||
matrix = [NSAffineTransform new];
|
||||
[matrix makeIdentityMatrix];
|
||||
[matrix appendTransform: _boundsMatrix];
|
||||
[matrix prependTransform: _boundsMatrix];
|
||||
/*
|
||||
* The flipping process must result in a coordinate system that
|
||||
* exactly overlays the original. To do that, we must translate
|
||||
* the origin by the height of the view.
|
||||
*/
|
||||
[flip setTransformStruct: ats];
|
||||
[matrix appendTransform: flip];
|
||||
[matrix prependTransform: flip];
|
||||
[matrix concat];
|
||||
yoffset = NSHeight(_frame) - NSMaxY(pageRect);
|
||||
}
|
||||
|
|
|
@ -125,10 +125,10 @@ static NSAffineTransform *flip = nil;
|
|||
|
||||
static NSNotificationCenter *nc = nil;
|
||||
|
||||
static SEL appSel;
|
||||
static SEL preSel;
|
||||
static SEL invalidateSel;
|
||||
|
||||
static void (*appImp)(NSAffineTransform*, SEL, NSAffineTransform*);
|
||||
static void (*preImp)(NSAffineTransform*, SEL, NSAffineTransform*);
|
||||
static void (*invalidateImp)(NSView*, SEL);
|
||||
|
||||
/*
|
||||
|
@ -211,11 +211,11 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
|||
NSObjectMapValueCallBacks, 0);
|
||||
typesLock = [NSLock new];
|
||||
|
||||
appSel = @selector(appendTransform:);
|
||||
preSel = @selector(prependTransform:);
|
||||
invalidateSel = @selector(_invalidateCoordinates);
|
||||
|
||||
appImp = (void (*)(NSAffineTransform*, SEL, NSAffineTransform*))
|
||||
[matrixClass instanceMethodForSelector: appSel];
|
||||
preImp = (void (*)(NSAffineTransform*, SEL, NSAffineTransform*))
|
||||
[matrixClass instanceMethodForSelector: preSel];
|
||||
|
||||
invalidateImp = (void (*)(NSView*, SEL))
|
||||
[self instanceMethodForSelector: invalidateSel];
|
||||
|
@ -3988,7 +3988,7 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
|||
NSAffineTransform *pMatrix = [_super_view _matrixToWindow];
|
||||
|
||||
[_matrixToWindow takeMatrixFromTransform: pMatrix];
|
||||
(*appImp)(_matrixToWindow, appSel, _frameMatrix);
|
||||
(*preImp)(_matrixToWindow, preSel, _frameMatrix);
|
||||
if (_rFlags.flipped_view != wasFlipped)
|
||||
{
|
||||
/*
|
||||
|
@ -3997,9 +3997,9 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
|||
* the origin by the height of the view.
|
||||
*/
|
||||
flip->matrix.tY = _frame.size.height;
|
||||
(*appImp)(_matrixToWindow, appSel, flip);
|
||||
(*preImp)(_matrixToWindow, preSel, flip);
|
||||
}
|
||||
(*appImp)(_matrixToWindow, appSel, _boundsMatrix);
|
||||
(*preImp)(_matrixToWindow, preSel, _boundsMatrix);
|
||||
[_matrixFromWindow takeMatrixFromTransform: _matrixToWindow];
|
||||
[_matrixFromWindow invert];
|
||||
|
||||
|
|
Loading…
Reference in a new issue