# Draw Path in SwiftUI framework

**URL:** <https://forums.kodeco.com/t/draw-path-in-swiftui-framework/137876>\
**Category:** SwiftUI by Tutorials\
**Created:** [April 16, 2021, 7:30am UTC](https://forums.kodeco.com/t/draw-path-in-swiftui-framework/137876 "2021-04-16T07:30:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![richmond\_jam](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/richmond_jam/32/102075_2.png) [@richmond\_jam](https://forums.kodeco.com/u/richmond_jam)\
**Post date:** [April 16, 2021, 7:30am UTC](https://forums.kodeco.com/t/draw-path-in-swiftui-framework/137876/1 "2021-04-16T07:30:28Z")

</div>

Hello Bill,

After I read chapter 13： Drawing & Custom Graphics in yours, I try to complete some sharp with swiftUI but I do not know how to use “public mutating func addArc(tangent1End p1: CGPoint, tangent2End p2: CGPoint, radius: CGFloat, transform: CGAffineTransform = .identity)” this function.  
Would u please show me some demo to let me know how to use it?

---

<div class="post-metadata">

**Author:** ![bmorefield](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/bmorefield/32/111506_2.png) [@bmorefield](https://forums.kodeco.com/u/bmorefield)\
**Post date:** [April 19, 2021, 1:02pm UTC](https://forums.kodeco.com/t/draw-path-in-swiftui-framework/137876/2 "2021-04-19T13:02:07Z")

</div>

In most cases, you’ll probably want to use the `addArc(center:radius:startAngle:endAngle:clockwise:)` instead. It’s a bit more intuitive unless your use case needs the parameters in the other method.

The one you’ve asked about wants two points and will create a tangent line from the current point on the path to each point. The resulting arc will then be drawn such that those tangent lines only touch the arc at a single point each and the arc will stop and end at those points.

You’d call it something like: `path.addArc(tangent1End: .init(x: 150, y: 150), tangent2End: .init(x: 150, y: 50), radius: 50)`

It’s useful in some cases, but the other method is much easier to work with to get a specific shape into the path.
