transformSize:
Index>Foundation>NSAffineTransform
サイズをレシーバの変換マトリックスで変換して結果を返します
-(NSSize)transformSize:(NSSize)aSize:
解説
サイズ(aSize)をレシーバの変換マトリックスで変換して結果を返します。
(NSAffineTransformクラス、10.3までのAppKitから10.4からFoundationに変更)
返り値
( NSSize )
変換後のサイズ
引数
( NSSize )aSize
変換前のサイズ
フレームワーク
Foundation
クラス
NSAffineTransform
Instance Methods
使用可能
10.0
参照
- transformBezierPath:
- transformPoint:
例文
#import "MyView.h" @implementation MyView //NSViewのサブクラス MyViewのDrawRectに上書き -(void)drawRect:(NSRect)rect { NSSize po ; NSAffineTransform *affin = [NSAffineTransform transform]; [affin scaleXBy: 10.0 yBy: 10.0]; po = [affin transformSize: NSMakeSize(20,20)]; NSLog([NSString stringWithFormat:@"width:%.1f height:%.1f",po.width,po.height]); } @end