NSFont:xHeight
Home 目次>ApplicationKit>NSFont

xHeight

エックスハイトを返します


-(float) xHeight


【返り値】
   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 xHeight]);

}

@end


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

Google
Webwww.oomori.com
Apple_Store_40x120

[ad:Usual day in Japan]

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

良い 

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

Home 目次>ApplicationKit>NSFont
修正日2007.4.10