discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug in NSAffineTransform


From: tima
Subject: Bug in NSAffineTransform
Date: Wed, 22 Feb 2006 23:24:21 -0800
User-agent: Mail/News 1.5 (X11/20060219)

Hello list,

After a long break I upgraded to latest gnustep release (gui-0.10.2) and
the image rotation in PhotoClip stopped working.

I figured out this was because of [NSAffineTransform -translateXBy: yBy]
that was changed in gui-0.10.0 to

- (void) translateXBy: (float)tranX  yBy: (float)tranY
{
  NSAffineTransformStruct tranm = identityTransform;
  tranm.tX = tranX;
  tranm.tY = tranY;
  matrix = matrix_multiply(tranm, matrix); // problem
}

The matrix multiplication is not commutative and the last line should be
instead
  matrix = matrix_multiply(matrix, tranm);

I prefer the old version though:

- (void) translateXBy: (float)tranX  yBy: (float)tranY
{
  TX += tranX;
  TY += tranY;
}

it's clearer and faster.

Can someone please update CVS?

Thank you,
Tima.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]