Skip to content

Commit

Permalink
Remove any fom SVGExporter
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriyvan committed Aug 22, 2024
1 parent 9874733 commit 8cf5ba9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/geometrize/SVGExporter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public struct SVGExporter {
/// - color: The color of the shape
/// - shape: The shape to convert to SVG data
/// - Returns: The SVG shape data for the given shape
func singleShapeData(color: Rgba, shape: any Shape) -> String {
func singleShapeData(color: Rgba, shape: Shape) -> String {
var shapeData: String = shapeData(shape: shape)

var styles: String = ""
Expand Down Expand Up @@ -45,7 +45,7 @@ public struct SVGExporter {
/// - Returns: A string representing the SVG image.
func exportSingleShape( // swiftlint:disable:this function_parameter_count
color: Rgba,
shape: any Shape,
shape: Shape,
width: Int,
height: Int,
originWidth: Int,
Expand Down Expand Up @@ -142,7 +142,7 @@ public struct SVGExporter {
"<path d=\"M\(Int(q.x1)) \(Int(q.y1)) Q\(Int(q.cx)) \(Int(q.cy)) \(Int(q.x2)) \(Int(q.y2))\" \(svg_style_hook)/>"
}

private func shapeData(shape: any Shape) -> String {
private func shapeData(shape: Shape) -> String {
switch shape {
case let rectangle as Rectangle:
return shapeData(rectangle: rectangle)
Expand Down

0 comments on commit 8cf5ba9

Please sign in to comment.