Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Source/Parser/SVG/Attributes/SVGFontSizeAttribute.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Yuri Strot on 29.05.2022.
//

import CoreGraphics
import Foundation

class SVGFontSizeAttribute: SVGDefaultAttribute<CGFloat> {

Expand Down
2 changes: 1 addition & 1 deletion Source/Parser/SVG/Attributes/SVGLengthAttribute.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Yuri Strot on 29.05.2022.
//

import CoreGraphics
import Foundation

class SVGLengthAttribute: SVGDefaultAttribute<CGFloat> {

Expand Down
2 changes: 1 addition & 1 deletion Source/Parser/SVG/Elements/SVGShapeParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Yuri Strot on 29.05.2022.
//

import CoreGraphics
import Foundation

class SVGShapeParser: SVGBaseElementParser {

Expand Down
1 change: 0 additions & 1 deletion Source/Parser/SVG/Elements/SVGStructureParsers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//

import Foundation
import CoreGraphics

class SVGViewportParser: SVGGroupParser {

Expand Down
1 change: 0 additions & 1 deletion Source/Parser/SVG/Primitives/SVGLengthParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//

import Foundation
import CoreGraphics

enum SVGLengthAxis {

Expand Down
2 changes: 1 addition & 1 deletion Source/Parser/SVG/SVGContext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Yuri Strot on 26.05.2022.
//

import CoreGraphics
import Foundation

protocol SVGContext {

Expand Down
2 changes: 1 addition & 1 deletion Source/Parser/SVG/SVGParserExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Yuri Strot on 25.05.2022.
//

import CoreGraphics
import Foundation

extension CGFloat {

Expand Down
10 changes: 5 additions & 5 deletions Source/Parser/SVG/SVGPathReader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down
2 changes: 1 addition & 1 deletion Source/Parser/SVG/Settings/SVGScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Yuri Strot on 27.05.2022.
//

import CoreGraphics
import Foundation

struct SVGScreen {

Expand Down
1 change: 0 additions & 1 deletion Source/Parser/SVG/Settings/SVGSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//

import Foundation
import CoreGraphics

public struct SVGSettings {

Expand Down
1 change: 0 additions & 1 deletion Source/Serialization/Serializer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//

import Foundation
import CoreGraphics

class Serializer {

Expand Down