-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add annotations #27
Add annotations #27
Conversation
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.
The code is fine as is, but there are a few places where I think it could be improved.
final case class AnnotationPosition( | ||
landmark: Landmark, | ||
arrowAngle: Angle, | ||
toPoint: (Point, Double) => Point |
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.
It's not obvious what this function is doing. I think it could use a bit of documentation.
) | ||
|
||
object AnnotationPosition { | ||
val degree90 = 1.5708 |
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.
If you import doodle.syntax.all.*
you can write angles using the degrees
extension method. E.g. you can write 90.degrees
, 180.degrees
, and so on.
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.
I have added a bit of documentation to clarify some things about AnnotationPosition
. Also added a simple example of an annotated plot.
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.
Nice work!
Worked on the issue:
The PR contains the following features:
Example of an annotation: