Skip to content

Commit 4117810

Browse files
Update README.md
1 parent ad08170 commit 4117810

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,24 @@ Geometry defines a `FrameReader` extension used to more easily gather geometry
99
from a SwiftUI view hierarchy.
1010

1111
## `CoreGraphics` Extensions
12-
Geometry defines `CGVectorType` a protocol unifying the various 2D CoreGraphics
12+
GCGVectorExt defines `CGVectorType` a protocol unifying the various 2D CoreGraphics
1313
types including `CGPoint`, `CGSize`, and `CGVector`. The type provides support for
1414
easy conversion among types.
1515

1616
The type also allows for a concise definition of standard operators for addition,
1717
subtraction, multiplication, and division involving `CGVectorType` types.
1818

19-
Finally, the package includes several extensions to `CGRect`:
19+
CGPathExt defines a function used to round corners on CGPaths. The function
20+
understands disjoint subpaths and offers several rounding styles including
21+
a `.strict` style which rounds to proper arcs, a `.natural` style which draws
22+
visually pleasant roundings, and an artistic `.freehand` style.
23+
24+
```swift
25+
let star = CGPath.star(corners: 5, innerRadius: 50, outerRadius: 100)
26+
let rounded = star.rounded(10, style: .default) // default = .natural rounding
27+
```
28+
29+
Finally, CGRectExt includes several extensions to `CGRect`:
2030

2131
```swift
2232
// fetch point at min X, mid Y

0 commit comments

Comments
 (0)