Skip to content
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

Arrow length #185

Merged
merged 9 commits into from May 14, 2014
Merged

Arrow length #185

merged 9 commits into from May 14, 2014

Conversation

jeffreyrosenbluth
Copy link
Member

This should be ready to merge.

The headSize and tailSize fields have been dropped in favor
of headLength and tailLength, this has several advantages:

  • more intuitive
  • consistent with gaps
  • allows lengths traversal which can be used e.g. to make the head and tail
    the same length so things like the uarrow example work.

We choose the names headLength and tailLength since they are
perpendicular to shaft width.

The missile head has been removed since it did not have a proper joint,
this would be visible for translucent heads, additionally it does not
allow for the calculation of radius given length. The user can always
achieve similar results by applying a cubic spline to dart (which is
what we were doing anyway).

Also the arrowhead... functions have been cleaned up and simplified
considerably.

@jeffreyrosenbluth
Copy link
Member Author

I'd like to merge this in before 1.2 for two reasons:

  • We lost the traversal that set both the head and tail length to
    the same value. This will restore it, and I feel that is a important
    use case, in particular with lineTail.
  • We have a lot of breaking changes going into 1.2, I think it's a
    good idea to include as many as we know will about now so
    that it is possible for minor subsequent releases not to break things.

@@ -27,13 +27,13 @@ module Diagrams.TwoD.Arrow
--
-- > -- Connecting two diagrams at their origins.
-- >
-- > sq = square 2 # showOrigin # lc darkgray # lw 0.07
-- > sq = square 2 # showOrigin # lc darkgray # lwG 0.07
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, good catch. However, it would be even better if we could replace these with something like lw thick or whatever looks right.

@jeffreyrosenbluth
Copy link
Member Author

Should be good to go

@byorgey
Copy link
Member

byorgey commented May 14, 2014

Looks great, thanks for putting this together @jeffreyrosenbluth !

byorgey added a commit that referenced this pull request May 14, 2014
@byorgey byorgey merged commit f077480 into master May 14, 2014
@byorgey byorgey deleted the arrow-length branch May 14, 2014 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants