mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-08 17:15:04 +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) {
|
if (self.clipPath) {
|
||||||
_clipNode = (RNSVGClipPath*)[self.svgView getDefinedClipPath:self.clipPath];
|
_clipNode = (RNSVGClipPath*)[self.svgView getDefinedClipPath:self.clipPath];
|
||||||
|
if (_cachedClipPath) {
|
||||||
|
CGPathRelease(_cachedClipPath);
|
||||||
|
}
|
||||||
_cachedClipPath = CGPathRetain([_clipNode getPath:context]);
|
_cachedClipPath = CGPathRetain([_clipNode getPath:context]);
|
||||||
if (_clipMask) {
|
if (_clipMask) {
|
||||||
CGImageRelease(_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.
|
// Glyphs whose midpoint-on-the-path are off the path are not rendered.
|
||||||
if (midPoint > endOfRendering) {
|
if (midPoint > endOfRendering) {
|
||||||
|
CGPathRelease(glyphPath);
|
||||||
continue;
|
continue;
|
||||||
} else if (midPoint < startOfRendering) {
|
} else if (midPoint < startOfRendering) {
|
||||||
|
CGPathRelease(glyphPath);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user