Skip to content

Commit a7e5a93

Browse files
authored
Merge pull request #56 from alpennec/main
Public initialiser to SVG.Insets
2 parents bf943ce + d80b1a0 commit a7e5a93

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

SwiftDraw/Image.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,18 @@ public extension SVG {
167167
public var bottom: CGFloat
168168
public var right: CGFloat
169169

170+
public init(
171+
top: CGFloat = 0,
172+
left: CGFloat = 0,
173+
bottom: CGFloat = 0,
174+
right: CGFloat = 0
175+
) {
176+
self.top = top
177+
self.left = left
178+
self.bottom = bottom
179+
self.right = right
180+
}
181+
170182
public static let zero = Insets(top: 0, left: 0, bottom: 0, right: 0)
171183
}
172184
}

0 commit comments

Comments
 (0)