diff --git a/Source/Parser/SVG/Attributes/SVGFontSizeAttribute.swift b/Source/Parser/SVG/Attributes/SVGFontSizeAttribute.swift index 6f92235..d1399c4 100644 --- a/Source/Parser/SVG/Attributes/SVGFontSizeAttribute.swift +++ b/Source/Parser/SVG/Attributes/SVGFontSizeAttribute.swift @@ -5,7 +5,7 @@ // Created by Yuri Strot on 29.05.2022. // -import CoreGraphics +import Foundation class SVGFontSizeAttribute: SVGDefaultAttribute { diff --git a/Source/Parser/SVG/Attributes/SVGLengthAttribute.swift b/Source/Parser/SVG/Attributes/SVGLengthAttribute.swift index 25205c6..a0e1f06 100644 --- a/Source/Parser/SVG/Attributes/SVGLengthAttribute.swift +++ b/Source/Parser/SVG/Attributes/SVGLengthAttribute.swift @@ -5,7 +5,7 @@ // Created by Yuri Strot on 29.05.2022. // -import CoreGraphics +import Foundation class SVGLengthAttribute: SVGDefaultAttribute { diff --git a/Source/Parser/SVG/Elements/SVGShapeParser.swift b/Source/Parser/SVG/Elements/SVGShapeParser.swift index 0e3aa4e..e2c8f38 100644 --- a/Source/Parser/SVG/Elements/SVGShapeParser.swift +++ b/Source/Parser/SVG/Elements/SVGShapeParser.swift @@ -5,7 +5,7 @@ // Created by Yuri Strot on 29.05.2022. // -import CoreGraphics +import Foundation class SVGShapeParser: SVGBaseElementParser { diff --git a/Source/Parser/SVG/Elements/SVGStructureParsers.swift b/Source/Parser/SVG/Elements/SVGStructureParsers.swift index 17bd6af..4a13745 100644 --- a/Source/Parser/SVG/Elements/SVGStructureParsers.swift +++ b/Source/Parser/SVG/Elements/SVGStructureParsers.swift @@ -6,7 +6,6 @@ // import Foundation -import CoreGraphics class SVGViewportParser: SVGGroupParser { diff --git a/Source/Parser/SVG/Primitives/SVGLengthParser.swift b/Source/Parser/SVG/Primitives/SVGLengthParser.swift index cc514bc..0312d3d 100644 --- a/Source/Parser/SVG/Primitives/SVGLengthParser.swift +++ b/Source/Parser/SVG/Primitives/SVGLengthParser.swift @@ -6,7 +6,6 @@ // import Foundation -import CoreGraphics enum SVGLengthAxis { diff --git a/Source/Parser/SVG/SVGContext.swift b/Source/Parser/SVG/SVGContext.swift index 5b81bc2..2bd58ea 100644 --- a/Source/Parser/SVG/SVGContext.swift +++ b/Source/Parser/SVG/SVGContext.swift @@ -5,7 +5,7 @@ // Created by Yuri Strot on 26.05.2022. // -import CoreGraphics +import Foundation protocol SVGContext { diff --git a/Source/Parser/SVG/SVGParserExtensions.swift b/Source/Parser/SVG/SVGParserExtensions.swift index ecfb6ed..5eea75b 100644 --- a/Source/Parser/SVG/SVGParserExtensions.swift +++ b/Source/Parser/SVG/SVGParserExtensions.swift @@ -5,7 +5,7 @@ // Created by Yuri Strot on 25.05.2022. // -import CoreGraphics +import Foundation extension CGFloat { diff --git a/Source/Parser/SVG/SVGPathReader.swift b/Source/Parser/SVG/SVGPathReader.swift index e3f00f4..8b7a808 100644 --- a/Source/Parser/SVG/SVGPathReader.swift +++ b/Source/Parser/SVG/SVGPathReader.swift @@ -560,13 +560,13 @@ extension SVGPath { bezierPath.addArc(withCenter: CGPoint(x: cx, y: cy), radius: CGFloat(w / 2), startAngle: extent, endAngle: end, clockwise: arcAngle >= 0) } else { let maxSize = CGFloat(max(w, h)) - let path = MBezierPath(arcCenter: CGPoint.zero, radius: maxSize / 2, startAngle: extent, endAngle: end, clockwise: arcAngle >= 0) - var transform = CGAffineTransform(translationX: cx, y: cy) transform = transform.rotated(by: CGFloat(rotation)) - path.apply(transform.scaledBy(x: CGFloat(w) / maxSize, y: CGFloat(h) / maxSize)) - - bezierPath.append(path) + transform = transform.scaledBy(x: CGFloat(w) / maxSize, y: CGFloat(h) / maxSize) + let mutablePath = CGMutablePath() + mutablePath.addPath(bezierPath.cgPath) + mutablePath.addArc(center: .zero, radius: maxSize / 2, startAngle: extent, endAngle: end, clockwise: arcAngle < 0, transform: transform) + bezierPath.cgPath = mutablePath } } diff --git a/Source/Parser/SVG/Settings/SVGScreen.swift b/Source/Parser/SVG/Settings/SVGScreen.swift index fb4d85c..5c19dd9 100644 --- a/Source/Parser/SVG/Settings/SVGScreen.swift +++ b/Source/Parser/SVG/Settings/SVGScreen.swift @@ -5,7 +5,7 @@ // Created by Yuri Strot on 27.05.2022. // -import CoreGraphics +import Foundation struct SVGScreen { diff --git a/Source/Parser/SVG/Settings/SVGSettings.swift b/Source/Parser/SVG/Settings/SVGSettings.swift index e2800a6..f838526 100644 --- a/Source/Parser/SVG/Settings/SVGSettings.swift +++ b/Source/Parser/SVG/Settings/SVGSettings.swift @@ -6,7 +6,6 @@ // import Foundation -import CoreGraphics public struct SVGSettings { diff --git a/Source/Serialization/Serializer.swift b/Source/Serialization/Serializer.swift index bc7fadb..e9732c4 100644 --- a/Source/Serialization/Serializer.swift +++ b/Source/Serialization/Serializer.swift @@ -6,7 +6,6 @@ // import Foundation -import CoreGraphics class Serializer {