Fix text on a path rendering accuracy

This commit is contained in:
Mikael Sand
2017-08-27 01:09:01 +03:00
parent 6cc3f76b24
commit 8dd795bdd7
6 changed files with 1 additions and 47 deletions
-1
View File
@@ -1,4 +1,3 @@
#import <React/UIView+React.h>
#import <CoreText/CoreText.h>
#import "FontData.h"
-5
View File
@@ -1,8 +1,3 @@
//
// Generated by the J2ObjC translator. DO NOT EDIT!
// source: GlyphContext.java
//
#import "GlyphContext.h"
#import <React/RCTFont.h>
#import "RNSVGNode.h"
+1
View File
@@ -801,6 +801,7 @@ CGFloat getTextAnchorOffset(enum TextAnchor textAnchor, CGFloat width)
//_bezierTransformer = [textPath getBezierTransformer];
textPathPath = [textPath getPath];
_path = [UIBezierPath bezierPathWithCGPath:[textPathPath getPath:nil]];
_path = [_path bezierPathByFlatteningPathAndImmutable:YES];
pathLength = [_path length];
return NO;
}