NSFont:renderingMode
Home 目次>ApplicationKit>NSFont
10.4

renderingMode

ディスプレイレンダリングモードを返します


-(NSFontRenderingMode) renderingMode


【返り値】
   NSFontRenderingModeなし


【解説】

ディスプレイレンダリングモードを返します。
NSFontDefaultRenderingMode  初期設定
NSFontAntialiasedRenderingMode
浮動小数点幅アンチエイリアス
NSFontIntegerAdvancementsRenderingMode
整数幅レンダリングモード
NSFontAntialiasedIntegerAdvancementsRenderingMode
整数幅アンチエイリアス



【例文】


#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


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

Google
Webwww.oomori.com
Apple_Store_40x120

[ad:Usual day in Japan]

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

良い 

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

Home 目次>ApplicationKit>NSFont
修正日2007.4.10