2003-07-31 23:52:10 +00:00
|
|
|
/*
|
|
|
|
NSAffineTransform.h
|
|
|
|
|
|
|
|
Copyright (C) 1996 Free Software Foundation, Inc.
|
|
|
|
|
|
|
|
Author: Ovidiu Predescu <ovidiu@net-community.com>
|
|
|
|
Date: August 1997
|
2006-11-19 11:32:51 +00:00
|
|
|
Rewrite for MacOS-X compatibility: Richard Frith-Macdonald, 1999
|
2003-07-31 23:52:10 +00:00
|
|
|
|
|
|
|
This file is part of the GNUstep GUI Library.
|
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
2007-10-29 21:16:17 +00:00
|
|
|
modify it under the terms of the GNU Lesser General Public
|
2003-07-31 23:52:10 +00:00
|
|
|
License as published by the Free Software Foundation; either
|
2008-06-10 04:01:49 +00:00
|
|
|
version 2 of the License, or (at your option) any later version.
|
2007-10-29 21:16:17 +00:00
|
|
|
|
2003-07-31 23:52:10 +00:00
|
|
|
This library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2007-10-29 21:16:17 +00:00
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Lesser General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
|
|
License along with this library; see the file COPYING.LIB.
|
|
|
|
If not, see <http://www.gnu.org/licenses/> or write to the
|
|
|
|
Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
|
|
|
Boston, MA 02110-1301, USA.
|
2003-07-31 23:52:10 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _GNUstep_H_NSAffineTransform
|
|
|
|
#define _GNUstep_H_NSAffineTransform
|
2006-11-06 13:58:37 +00:00
|
|
|
#import <GNUstepBase/GSVersionMacros.h>
|
2003-07-31 23:52:10 +00:00
|
|
|
|
2006-11-19 11:32:51 +00:00
|
|
|
#import <Foundation/NSAffineTransform.h>
|
2003-07-31 23:52:10 +00:00
|
|
|
|
|
|
|
@class NSBezierPath;
|
|
|
|
|
2006-11-19 11:32:51 +00:00
|
|
|
@interface NSAffineTransform (GUIAdditions)
|
|
|
|
|
2003-07-31 23:52:10 +00:00
|
|
|
- (void) concat;
|
|
|
|
- (void) set;
|
|
|
|
- (NSBezierPath*) transformBezierPath: (NSBezierPath*)aPath;
|
|
|
|
@end
|
|
|
|
|
2006-11-06 13:58:37 +00:00
|
|
|
#if OS_API_VERSION(GS_API_NONE, GS_API_NONE)
|
2007-03-22 16:41:12 +00:00
|
|
|
#if GS_API_VERSION(GS_API_NONE, 011500)
|
2003-07-31 23:52:10 +00:00
|
|
|
@interface NSAffineTransform (GNUstep)
|
|
|
|
- (void) translateToPoint: (NSPoint)point;
|
2011-06-28 20:59:24 +00:00
|
|
|
- (void) scaleTo: (CGFloat)sx : (CGFloat)sy;
|
2003-07-31 23:52:10 +00:00
|
|
|
- (void) makeIdentityMatrix;
|
2011-06-28 20:59:24 +00:00
|
|
|
- (CGFloat) rotationAngle;
|
2003-07-31 23:52:10 +00:00
|
|
|
- (void) setFrameOrigin: (NSPoint)point;
|
2011-06-28 20:59:24 +00:00
|
|
|
- (void) setFrameRotation: (CGFloat)angle;
|
2003-07-31 23:52:10 +00:00
|
|
|
|
2006-11-19 11:32:51 +00:00
|
|
|
/* Deprecated: use -invert */
|
2003-07-31 23:52:10 +00:00
|
|
|
- (void) inverse;
|
|
|
|
|
|
|
|
- (BOOL) isRotated;
|
|
|
|
|
2005-03-20 04:35:12 +00:00
|
|
|
- (void) boundingRectFor: (NSRect)rect result: (NSRect*)newRect;
|
2003-07-31 23:52:10 +00:00
|
|
|
|
|
|
|
/* Returns anotherMatrix * self */
|
|
|
|
- (void) concatenateWith: (NSAffineTransform*)anotherMatrix;
|
|
|
|
- (void) concatenateWithMatrix: (const float[6])anotherMatrix;
|
|
|
|
|
|
|
|
- (NSPoint) pointInMatrixSpace: (NSPoint)point;
|
|
|
|
- (NSPoint) deltaPointInMatrixSpace: (NSPoint)point;
|
|
|
|
- (NSSize) sizeInMatrixSpace: (NSSize)size;
|
|
|
|
- (NSRect) rectInMatrixSpace: (NSRect)rect;
|
|
|
|
|
2006-11-19 11:32:51 +00:00
|
|
|
/* Deprecated: use -setTransformStruct: */
|
2003-07-31 23:52:10 +00:00
|
|
|
- (void) setMatrix: (const float[6])replace;
|
2006-11-19 11:32:51 +00:00
|
|
|
/* Deprecated: use -transformStruct */
|
2003-07-31 23:52:10 +00:00
|
|
|
- (void) getMatrix: (float[6])replace;
|
|
|
|
|
|
|
|
- (void) takeMatrixFromTransform: (NSAffineTransform *)aTransform;
|
|
|
|
|
|
|
|
@end
|
|
|
|
#endif
|
2007-03-22 16:41:12 +00:00
|
|
|
#endif
|
2003-07-31 23:52:10 +00:00
|
|
|
|
|
|
|
#endif /* _GNUstep_H_NSAffineTransform */
|