macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

lineSpacingAfterGlyphAtIndex:withProposedLineFragmentRect:

行間を返します
-(float)lineSpacingAfterGlyphAtIndex:(unsigned)glyphIndex:
           withProposedLineFragmentRect:(NSRect)rect:

解説

行間を返します。

glyphIndexのグリフが影響される

返り値

( float )

なし

引数

( unsigned )glyphIndex
( NSRect )rect

フレームワーク

ApplicationKit

クラス

NSTypesetter

Instance Methods

使用可能

10.4

参照

例文

//行/段落 スペース
- (float)lineSpacingAfterGlyphAtIndex:(unsigned)glyphIndex withProposedLineFragmentRect:(NSRect)rect
{
	NSLog(@"-lineSpacingAfterGlyphAtIndex      glyphIndex (%u)",glyphIndex);
	
	float space = [super lineSpacingAfterGlyphAtIndex:glyphIndex withProposedLineFragmentRect:rect];
	NSLog(@"-lineSpacingAfterGlyphAtIndex      space (%.1f)",space);
	return space;
}