Skip to content
Open
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
10 changes: 10 additions & 0 deletions Sources/Templates/Shapes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down