Files
react-native-svg/ios/Text/GlyphContext.h
Mikael Sand ec2a967592 Implement getAlignmentBaseline and getBaselineShift in ios. (#527)
* Implement correct transform parser

* Implement getAlignmentBaseline and getBaselineShift in ios.
Add comments to glyphcontext and align with android.
Implement correct isWordSeparator predicate.
Cleanup GlyphContext j2objc remnants.

* Fix getBaselineShift bugs and font data invalidation.
2017-12-16 08:57:53 -08:00

50 lines
1020 B
Objective-C

#import <React/UIView+React.h>
#import <CoreText/CoreText.h>
#import "FontData.h"
@class RNSVGText;
@class RNSVGGroup;
@class GlyphContext;
@interface GlyphContext : NSObject
- (CTFontRef)getGlyphFont;
- (instancetype)initWithScale:(float)scale_
width:(float)width
height:(float)height;
- (FontData *)getFont;
- (double)getFontSize;
- (float)getHeight;
- (float)getWidth;
- (double)nextDeltaX;
- (double)nextDeltaY;
- (NSNumber*)nextRotation;
- (double)nextXWithDouble:(double)advance;
- (double)nextY;
- (void)popContext;
- (void)pushContext:(RNSVGText *)node
font:(NSDictionary *)font
x:(NSArray*)x
y:(NSArray*)y
deltaX:(NSArray*)deltaX
deltaY:(NSArray*)deltaY
rotate:(NSArray*)rotate;
- (void)pushContext:(RNSVGGroup*)node
font:(NSDictionary *)font;
@end