-
-
Notifications
You must be signed in to change notification settings - Fork 443
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
Rounded arrow #30
Comments
Hi @kevin-hirsch |
Thank you very much! 👍 |
Yeah, I was wrong. I'm having a bit of troubles implementing this. 😅 |
No worries ;) |
Any idea (or PR) is welcome. Since the arrow is drawn point by point, adding a rounded tip requires some math: the offset of the starting and ending point of the straight lines, and the starting and ending angle of the arc that connects the two straight lines. |
Yeah I see the difficulty here ^^ Maybe you can try this: https://www.bignerdranch.com/blog/core-graphics-part-three-lines/#join-the-dark-side enum CGLineJoin {
kCGLineJoinMiter // default
kCGLineJoinRound
kCGLineJoinBevel
} |
I'm using |
Right, forget my post above then ;) |
Check this out? Not sure how much work this will be https://stackoverflow.com/questions/20442203/uibezierpath-triangle-with-rounded-edges |
There's a bit of tinkering to do, but it certainly is doable. |
Hi, |
Hi, I just created a pull request (#157) with this feature. You can set the property arrowRadius (CGFloat) to set the arrow's corner radius. |
Hi @andreamazz, thank you for your super
AMPopTip
! :)What do you think of adding a property like
arrowRadius
to have a rounded arrow?I would like it very much! Something like this:
The text was updated successfully, but these errors were encountered: