Efficient implementation of isRotated

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13944 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2002-06-22 16:21:46 +00:00
parent 180e7b6c2c
commit 5ff3a3adda

View file

@ -436,12 +436,15 @@ static NSAffineTransformStruct identityTransform = {
- (BOOL) isRotated - (BOOL) isRotated
{ {
if (rotationAngle == 0) if (B == 0 && D == 0)
return NO; {
if (rotationAngle < 0 && [self rotationAngle] == 0)
return NO; return NO;
}
else
{
return YES; return YES;
} }
}
- (void) boundingRectFor: (NSRect)rect result: (NSRect*)new - (void) boundingRectFor: (NSRect)rect result: (NSRect*)new
{ {