From 69dadc65822d275b9593a647053c22c7342dd639 Mon Sep 17 00:00:00 2001 From: Valentin Perignon Date: Wed, 4 Oct 2023 10:11:48 +0200 Subject: [PATCH] Add BackgroundWithArrow missing public init --- Sources/Templates/Shapes.swift | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Sources/Templates/Shapes.swift b/Sources/Templates/Shapes.swift index a92586d..feb2641 100644 --- a/Sources/Templates/Shapes.swift +++ b/Sources/Templates/Shapes.swift @@ -46,6 +46,16 @@ public extension Templates { */ public static var arrowSidePadding = CGFloat(2.8) + /** + A shape that has an arrow protruding. + - parameter arrowSide: The side of the rectangle to have the arrow. + - parameter cornerRadius: The shape's corner radius + */ + public init(arrowSide: ArrowSide, cornerRadius: CGFloat) { + self.arrowSide = arrowSide + self.cornerRadius = cornerRadius + } + /// Path for the triangular arrow. public func arrowPath() -> Path { let arrowHalfWidth = (BackgroundWithArrow.width / 2) * 0.6