Complete rename across all bundle IDs, App Groups, CloudKit containers, StoreKit product IDs, data store filenames, URL schemes, logger subsystems, Swift identifiers, user-facing strings (7 languages), file names, directory names, Xcode project, schemes, assets, and documentation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
32 lines
952 B
Swift
32 lines
952 B
Swift
//
|
|
// DiamondView.swift
|
|
// Reflect
|
|
//
|
|
// Created by Trey Tartt on 3/20/22.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct Diamond:Shape {
|
|
|
|
func path(in rect: CGRect) -> Path {
|
|
var path = Path()
|
|
// get the center of the rect
|
|
let center = CGPoint(x: rect.midX, y: rect.midY)
|
|
// get the starting of our drawing the right side of our diamond
|
|
let startingPoint = CGPoint(x: rect.maxX, y: center.y)
|
|
// move our start of drawing to the beggining point
|
|
path.move(to: startingPoint)
|
|
// distance / 2 is our height
|
|
// create all our points
|
|
let secondPoint = CGPoint(x: center.x, y: rect.maxY)
|
|
let thirdPoint = CGPoint(x: rect.minX , y: center.y)
|
|
let fourthPoint = CGPoint(x: center.x, y: rect.minY)
|
|
path.addLine(to: secondPoint)
|
|
path.addLine(to: thirdPoint)
|
|
path.addLine(to: fourthPoint)
|
|
path.addLine(to: startingPoint)
|
|
return path
|
|
}
|
|
}
|