Skip to content

Commit

Permalink
Merge pull request #56 from alpennec/main
Browse files Browse the repository at this point in the history
Public initialiser to SVG.Insets
  • Loading branch information
swhitty authored Nov 5, 2024
2 parents bf943ce + d80b1a0 commit a7e5a93
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions SwiftDraw/Image.swift
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,18 @@ public extension SVG {
public var bottom: CGFloat
public var right: CGFloat

public init(
top: CGFloat = 0,
left: CGFloat = 0,
bottom: CGFloat = 0,
right: CGFloat = 0
) {
self.top = top
self.left = left
self.bottom = bottom
self.right = right
}

public static let zero = Insets(top: 0, left: 0, bottom: 0, right: 0)
}
}

0 comments on commit a7e5a93

Please sign in to comment.