| Home 目次>ApplicationKit>NSFont | |
positionOfGlyph:struckOverRect:metricsExist:
グリフの位置
-(NSPoint) positionOfGlyph:(NSGlyph)aGlyph
struckOverRect:(NSRect)aRect
metricsExist:(BOOL *)flag
【返り値】 | |
| NSPoint | グリフの位置 |
| 【パラメータ】 | |
| aGlyph | グリフ |
| aRect | 範囲 |
| flag | フォントメトリックスフラグ |
【解説】
グリフの位置を返します。
Mac OS X v10.4 以降使えません。
【例文】
#import "MyObject.h"
@implementation MyObject
- ( IBAction )myAction:( id )sender
{
NSFont *fnt;
BOOL ret;
fnt = [NSFont fontWithName: @"Osaka" size: 36 ] ;
NSLog([NSString stringWithFormat: @"%f" ,
[fnt positionOfGlyph:(NSGlyph) 'A'
struckOverRect:NSMakeRect( 1 , 1 , 10 , 10 )
metricsExist:&ret
].x]);
if (ret){
NSLog( @"YES" );
} else {
NSLog( @"NO" );
}
}
@end
![]() | |
この記事を評価してください。
| Home 目次>ApplicationKit>NSFont | 修正日2007.4.9 |