getRectsBeingDrawn:count:
描画された矩形を返します
-(void)getRectsBeingDrawn:(const NSRect **)rects: count:(int *)count:
- 出版社/メーカー: 遠藤商事
- メディア: ホーム&キッチン
- クリック: 16回
- この商品を含むブログを見る
解説
描画された矩形を返します。
返り値
( void )
なし
引数
( const NSRect ** )rects
( int * )count
フレームワーク
ApplicationKit
クラス
NSView
Instance Methods
使用可能
10.3
参照
-wantsDefaultClipping
例文
- (void)drawRect:(NSRect)rect { const NSRect *rects; int rectIndex, rectCount; [self getRectsBeingDrawn:&rects count:&rectCount]; //リサイズ中か if ([self inLiveResize]) { //ウインドウ背景色で描画 [[NSColor windowBackgroundColor] setFill]; NSRectFillList(rects, rectCount); } else { //リサイズ中じゃなかったら描画された部分だけ for (rectIndex = 0; rectIndex < rectCount; rectIndex++) { NSRect rect = rects[rectIndex]; [cachedImage compositeToPoint:rect.origin fromRect:rect operation:NSCompositeCopy]; } } }