renderingMode
ディスプレイレンダリングモードを返します
解説
ディスプレイレンダリングモードを返します。
NSFontDefaultRenderingMode 初期設定
NSFontAntialiasedRenderingMode 浮動小数点幅アンチエイリアス
NSFontIntegerAdvancementsRenderingMode 整数幅レンダリングモード
NSFontAntialiasedIntegerAdvancementsRenderingMode 整数幅アンチエイリアス
返り値
( NSFontRenderingMode )
なし
引数
フレームワーク
ApplicationKit
クラス
NSFont
Instance Methods
使用可能
10.4
参照
-screenFontWithRenderingMode:
例文
#import "MyView.h" //MyViewはNSViewのサブクラス @implementation MyView -(void)drawRect:(NSRect)rect { NSFont *font =[NSFont userFontOfSize:50.0]; NSLog([font fontName]); switch ([font renderingMode]){ case NSFontDefaultRenderingMode: NSLog(@"NSFontDefaultRenderingMode"); break; case NSFontAntialiasedRenderingMode: NSLog(@"NSFontAntialiasedRenderingMode"); break; case NSFontIntegerAdvancementsRenderingMode: NSLog(@"NSFontIntegerAdvancementsRenderingMode"); break; case NSFontAntialiasedIntegerAdvancementsRenderingMode: NSLog(@"NSFontAntialiasedIntegerAdvancementsRenderingMode"); break; default: NSLog(@"default"); } NSBezierPath *thePath = [NSBezierPath bezierPath]; NSGlyph glyphID[11]={43,72,79,79,82,04,58,82,85,79,71}; [thePath moveToPoint:NSMakePoint(10,10)]; [thePath appendBezierPathWithGlyphs:&glyphID[0] count:11 inFont:font ]; [[NSColor blueColor] set]; [thePath fill]; } @end