| Home 目次>ApplicationKit>NSFont | |
underlinePosition
下線の位置を返します
-(float) underlinePosition
【返り値】 | |
| float | 下線の位置 |
【解説】
下線の位置を返します。
【例文】
#import "MyView.h"
//MyView は NSView のサブクラス
@implementation MyView
-( void )drawRect:(NSRect)rect
{
NSFont *font =[NSFont userFontOfSize: 180.0 ];
NSLog([font fontName]);
NSBezierPath *thePath = [NSBezierPath bezierPath];
NSGlyph glyphID[ 2 ]={ 43 , 72 };
[thePath moveToPoint:NSMakePoint( 0 , 0 )];
[thePath appendBezierPathWithGlyphs:&glyphID[ 0 ]
count: 2
inFont:font
];
[[NSColor blueColor] set];
[thePath fill];
NSLog( @"%f" ,[font underlinePosition]);
}
@end
![]() | |
この記事を評価してください。
| Home 目次>ApplicationKit>NSFont | 修正日2007.4.10 |