NSCachedImageRep:initWithWindow:rect:
Home 目次>ApplicationKit>NSCachedImageRep このサイトはこちらに移転しました。

initWithWindow:rect:

ウインドウの範囲でNSCachedImageRepを初期化して返します


-(id) initWithWindow:(NSWindow *)aWindow
   rect:(NSRect)aRect


【返り値】
   idNSCachedImageRep
【パラメータ】
   aWindowウインドウ
   aRect範囲


【解説】

ウインドウ(aWindow)の範囲(aRect)でNSCachedImageRepを初期化して返します。



【例文】


#import "MyObject.h"

@implementation MyObject

- (IBAction)myAction:(id)sender
{
NSCachedImageRep *cachImgRep = [NSCachedImageRep alloc];

[cachImgRep initWithWindow:[sender window]
rect:NSMakeRect(0,0,100,100)
];


NSLog([NSString stringWithFormat:@"x=%.1f,y=%.1f,w=%.1f,h=%.1f",
[cachImgRep rect].origin.x,
[cachImgRep rect].origin.y,
[cachImgRep rect].size.width,
[cachImgRep rect].size.height
] );


}

@end


(C) 2000-2009 Satoshi Oomori.
[Apple]

Google
Webwww.oomori.com
Apple_Store_40x120

[ad:Usual day in Japan]

この記事を評価してください。 

良い 

間違いがある 説明がわかりにくい 例文がわかりにくい  

Home 目次>ApplicationKit>NSCachedImageRep
修正日2006.12.26