1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
| //
| // File.swift
| // LiveProject
| //
| // Created by 倪路朋 on 6/25/25.
| //
|
| import Foundation
| import SwiftUI
|
| struct IconRect: Shape {
|
| func path(in rect: CGRect) -> Path {
| var path = Path()
|
| let cornerRadius = rect.width * 0.08
| let borderRect = CGRect(origin: .zero, size: rect.size)
| path.addRoundedRect(in: borderRect, cornerSize: CGSize(width: cornerRadius, height: cornerRadius))
|
| return path
| }
| }
|
|