Created
May 7, 2021 02:29
-
-
Save JetForMe/5c358c8af097564adf35b957ce865e27 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct CurveEditor: View { | |
var body: some View | |
{ | |
GeometryReader { geom in | |
let width = geom.width // Make the rest of the code a bit cleaner | |
let height = geom. height | |
Path { path in | |
path.move(to: CGPoint(x: 10.0, y: 10.0)) | |
path.addLine(to: CGPoint(x: geom.size.width - 10.0, y: geom.size.height - 10.0)) | |
} | |
.stroke(style: StrokeStyle(lineWidth: 20.0, lineCap: .round)) | |
.foregroundColor(.blue) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment