mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-07 08:45:00 +00:00
[iOS] Fix glyph path and clip path release.
This commit is contained in:
@@ -283,6 +283,9 @@ CGFloat const RNSVG_DEFAULT_FONT_SIZE = 12;
|
||||
{
|
||||
if (self.clipPath) {
|
||||
_clipNode = (RNSVGClipPath*)[self.svgView getDefinedClipPath:self.clipPath];
|
||||
if (_cachedClipPath) {
|
||||
CGPathRelease(_cachedClipPath);
|
||||
}
|
||||
_cachedClipPath = CGPathRetain([_clipNode getPath:context]);
|
||||
if (_clipMask) {
|
||||
CGImageRelease(_clipMask);
|
||||
|
||||
@@ -752,8 +752,10 @@ static CGFloat RNSVGTSpan_radToDeg = 180 / (CGFloat)M_PI;
|
||||
|
||||
// Glyphs whose midpoint-on-the-path are off the path are not rendered.
|
||||
if (midPoint > endOfRendering) {
|
||||
CGPathRelease(glyphPath);
|
||||
continue;
|
||||
} else if (midPoint < startOfRendering) {
|
||||
CGPathRelease(glyphPath);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user