diff --git a/ChangeLog b/ChangeLog index 4047834fb..db28110d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2004-01-25 Fred Kiefer + + * 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 * Source/NSStringDrawing.m: Big redesign. diff --git a/Source/NSAffineTransform.m b/Source/NSAffineTransform.m index 49af34bbb..b976cbf0b 100644 --- a/Source/NSAffineTransform.m +++ b/Source/NSAffineTransform.m @@ -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 diff --git a/Source/NSPrintOperation.m b/Source/NSPrintOperation.m index 6b657fbcc..a9f181938 100644 --- a/Source/NSPrintOperation.m +++ b/Source/NSPrintOperation.m @@ -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); } diff --git a/Source/NSView.m b/Source/NSView.m index 811af7e62..83ff2d3a4 100644 --- a/Source/NSView.m +++ b/Source/NSView.m @@ -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];