react-native-svg-desktop/apple/Elements/RNSVGPath.m

39 строки
582 B
Mathematica
Исходник Постоянная ссылка Обычный вид История

/**
* Copyright (c) 2015-present, Horcrux.
* All rights reserved.
*
* This source code is licensed under the MIT-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#import "RNSVGPath.h"
@implementation RNSVGPath
2017-01-09 15:16:20 +03:00
{
CGPathRef _path;
}
2017-01-09 15:16:20 +03:00
- (void)setD:(RNSVGPathParser *)d
{
if (d == _d) {
return;
}
2017-01-09 06:11:12 +03:00
[self invalidate];
2017-01-09 15:16:20 +03:00
_d = d;
CGPathRelease(_path);
_path = CGPathRetain([d getPath]);
}
- (CGPathRef)getPath:(CGContextRef)context
{
2017-01-09 15:16:20 +03:00
return _path;
}
- (void)dealloc
{
2017-01-09 15:16:20 +03:00
CGPathRelease(_path);
}
@end