mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-02 14:50:43 +00:00
Implement TextPath: first step (iOS)
This commit is contained in:
@@ -9,26 +9,35 @@
|
||||
#import "RNSVGPath.h"
|
||||
|
||||
@implementation RNSVGPath
|
||||
{
|
||||
CGPathRef _path;
|
||||
}
|
||||
|
||||
- (void)setD:(CGPathRef)d
|
||||
- (void)setD:(RNSVGPathParser *)d
|
||||
{
|
||||
if (d == _d) {
|
||||
return;
|
||||
}
|
||||
|
||||
[self invalidate];
|
||||
CGPathRelease(_d);
|
||||
_d = CGPathRetain(d);
|
||||
_d = d;
|
||||
CGPathRelease(_path);
|
||||
_path = CGPathRetain([d getPath]);
|
||||
}
|
||||
|
||||
- (CGPathRef)getPath:(CGContextRef)context
|
||||
{
|
||||
return self.d;
|
||||
return _path;
|
||||
}
|
||||
|
||||
- (NSArray *)getBezierCurves
|
||||
{
|
||||
return [_d getBezierCurves];
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
CGPathRelease(_d);
|
||||
CGPathRelease(_path);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user