NSFont:textTransform
Home 目次>ApplicationKit>NSFont
10.4

textTransform

レシーバーの変換マトリックスを返します


-(NSAffineTransform *) textTransform


【返り値】
   NSAffineTransform *なし


【解説】

レシーバーの変換マトリックスを返します。



【例文】


#import "MyView.h"

//MyView NSView のサブクラス
@implementation MyView

-(
void )drawRect:(NSRect)rect
{
NSFont *font = [NSFont fontWithName:
@"Osaka" size: 100.0 ];


NSBezierPath *thePath = [NSBezierPath bezierPath];
NSGlyph glyphID[
8 ];
glyphID[
0 ]= 70 ;
glyphID[
1 ]= 99 ;
glyphID[
2 ]= 106 ;
glyphID[
3 ]= 106 ;
glyphID[
4 ]= 109 ;
glyphID[
5 ]= 2284 ;
glyphID[
6 ]= 1064 ;
glyphID[
7 ]= 262 ;

[thePath moveToPoint:NSMakePoint(
10 , 10 )];
[thePath appendBezierPathWithGlyphs:&glyphID[
0 ]
count:
8
inFont:font
];


[[NSColor blueColor] set];
[thePath fill];

NSAffineTransform *affine = [font textTransform];
NSLog([affine description]);
NSPoint newPoint = [affine transformPoint: NSMakePoint(
20 , 20 )];
NSLog(
@"x:%.1f y:%.1f" ,newPoint.x,newPoint.y);



}

@en
d


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

Google
Webwww.oomori.com
Apple_Store_40x120

[ad:Usual day in Japan]

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

良い 

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

Home 目次>ApplicationKit>NSFont
修正日2007.4.10