rectForPage:
ページ番号によって印刷するレシーバーの部分調べる
-(NSRect)rectForPage:(int)pageNumber:
解説
ページ番号によって印刷するレシーバーの部分調べる
knowsPageRangeが反応しなければ起動しない
ページ番号の整数
ページ番号は1から始まる
返り値
( NSRect )
矩形
引数
( int )pageNumber
ページ番号
フレームワーク
ApplicationKit
クラス
NSView
Instance Methods
使用可能
10.0
参照
- adjustPageHeightNew:top:bottom:limit:
- adjustPageWidthNew:left:right:limit:
例文
- (NSRect)rectForPage:(int)page { NSLog(@"page %d",page); NSRect bounds = [self bounds]; float pageHeight = [self calculatePrintHeight]; return NSMakeRect( NSMinX(bounds), NSMaxY(bounds) - page * pageHeight, NSWidth(bounds), pageHeight ); }