-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Remove Dependency on Asset catalog to support SPM #189
Conversation
private func pencil() -> UIBezierPath { | ||
let path = UIBezierPath() | ||
path.move(to: CGPoint(x: 3, y: 17.25)) | ||
path.addLine(to: CGPoint(x: 3, y: 21)) | ||
path.addLine(to: CGPoint(x: 6.75, y: 21)) | ||
path.addLine(to: CGPoint(x: 17.81, y: 9.94)) | ||
path.addLine(to: CGPoint(x: 14.06, y: 6.19)) | ||
path.addLine(to: CGPoint(x: 3, y: 17.25)) | ||
path.close() | ||
path.move(to: CGPoint(x: 20.71, y: 7.04)) | ||
path.addCurve(to: CGPoint(x: 20.71, y: 5.63), | ||
controlPoint1: CGPoint(x: 21.1, y: 6.65), | ||
controlPoint2: CGPoint(x: 21.1, y: 6.02)) | ||
path.addLine(to: CGPoint(x: 18.37, y: 3.29)) | ||
path.addCurve(to: CGPoint(x: 16.96, y: 3.29), | ||
controlPoint1: CGPoint(x: 17.98, y: 2.9), | ||
controlPoint2: CGPoint(x: 17.35, y: 2.9)) | ||
path.addLine(to: CGPoint(x: 15.13, y: 5.12)) | ||
path.addLine(to: CGPoint(x: 18.88, y: 8.87)) | ||
path.addLine(to: CGPoint(x: 20.71, y: 7.04)) | ||
path.close() | ||
return path | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually getting drawn based of the SVG file for edit
let size = CGSize(width: 24.0, height: 24.0) | ||
let sides = 5 | ||
let radius: CGFloat = min(size.width, size.height) / 2.0 | ||
let origin = CGPoint(x: size.width / 2.0 , y: size.height / 2.0) | ||
let pointiness: CGFloat = 2.0 | ||
let startAngle = CGFloat(-1 * (360 / sides / 4)) | ||
let adjustment = startAngle + CGFloat(360 / sides / 2) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potentially might want to refactor this since similar vars are being declared in confetti()
and triangle()
🤔
This would suffice to get us on SPM? @lkeude96 |
@croossin i was able to create a branch from this one and got SPM to work 🎉 . Ideally we would be reorganizing a bit and clean up the folder and project structure as well but just adding In addition, i think the above work could also benefit a similar work mentioned in #10 by @lwdupont cc #172 |
Before you make a Pull Request, read the important guidelines:
Issue Link 🔗
Goals of this PR 🎉
Remove dependency on the Assets catalog
How Has This Been Tested 🔍
Please let us know if you have tested your PR and if we need to reproduce the issues. Also, please let us know if we need any relevant information for running the tests.
Test Configuration 👾
Things to check on 🎯