* feat: new protocol for chained functions, and added support for explicit Y ranges. X coming as well * feat: add new axis interface (#253)
18 lines
599 B
Swift
18 lines
599 B
Swift
import SwiftUI
|
|
|
|
extension Shape {
|
|
func fill<Fill: ShapeStyle, Stroke: ShapeStyle>(_ fillStyle: Fill, strokeBorder strokeStyle: Stroke, lineWidth: Double = 1) -> some View {
|
|
self
|
|
.stroke(strokeStyle, lineWidth: lineWidth)
|
|
.background(self.fill(fillStyle))
|
|
}
|
|
}
|
|
|
|
extension InsettableShape {
|
|
func fill<Fill: ShapeStyle, Stroke: ShapeStyle>(_ fillStyle: Fill, strokeBorder strokeStyle: Stroke, lineWidth: Double = 1) -> some View {
|
|
self
|
|
.strokeBorder(strokeStyle, lineWidth: lineWidth)
|
|
.background(self.fill(fillStyle))
|
|
}
|
|
}
|