forked from mobfarm/FastPdfKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFPKGlyphBox.h
66 lines (52 loc) · 1.46 KB
/
FPKGlyphBox.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//
// MFGlyphBox.h
// FastPdfKitLibrary
//
// Created by Nicolò Tosi on 11/29/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <QuartzCore/QuartzCore.h>
@interface FPKGlyphBox : NSObject {
CGRect box;
CGPoint origin;
CGFloat ascent;
CGFloat descent;
CGFloat width;
BOOL synthesized;
unsigned int * unicodes;
int unicodes_len;
}
-(id)initWithBox:(CGRect)box unicodes:(unsigned int *)unicodes length:(int)len;
@property (nonatomic,readwrite) BOOL synthesized;
/**
Bounding box of the glyph in page space.
*/
@property (nonatomic,readwrite) CGRect box;
/**
Origin of the glyph box. That is the point in space were the glyph is laid down.
*/
@property (nonatomic, readwrite) CGPoint origin;
/**
Height of the glyph box above the text baseline.
*/
@property (nonatomic, readwrite) CGFloat ascent;
/**
Descent of the glyph box below the text baseline.
*/
@property (nonatomic, readwrite) CGFloat descent;
/**
Width of the glyph box.
*/
@property (nonatomic, readwrite) CGFloat width;
/**
UTF-8 string representation of the text of this glyph box, usually is just a
single unicode codepoint. It is synthesized from an opaque representation.
*/
-(NSString *)text;
/**
Class method to convert an array of MFGlyphBox into an human-readable string. It
does not call a concatenation of -text message, so it is faster.
*/
+(NSString *)textFromBoxArray:(NSArray *)array;
@end