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

Allow arrowheads in the middle of a shaft #262

Open
byorgey opened this issue Sep 14, 2015 · 2 comments
Open

Allow arrowheads in the middle of a shaft #262

byorgey opened this issue Sep 14, 2015 · 2 comments

Comments

@byorgey
Copy link
Member

byorgey commented Sep 14, 2015

Sometimes one might like to draw arrows where the arrowhead shows up at the midpoint of the shaft. For example, this style is often used to indicate the orientation of edges in a directed graph. Currently this can be hacked by e.g. drawing two arrows, one to the midpoint and one without a head the rest of the way (overlapping them a bit so there is no gap) but it would be nice to support this directly. I am not sure what the API should be. Perhaps there can just be a parameter specifying how far along the shaft the head (or, respectively, the tail) should be placed (as a fraction of the arc length); if you want the midpoint you can specify 0.5.

@jeffreyrosenbluth
Copy link
Member

More generally most vector graphics libraries allow markers to be placed
anywhere along a "path".
I believe most packages place the marker on top of the path, in contrast to
our arrow implementation,
in which the shaft is carefully connected to the arrowhead.

On Mon, Sep 14, 2015 at 10:08 AM Brent Yorgey notifications@github.com
wrote:

Sometimes one might like to draw arrows where the arrowhead shows up at
the midpoint of the shaft. For example, this style is often used to
indicate the orientation of edges in a directed graph. Currently this can
be hacked by e.g. drawing two arrows, one to the midpoint and one without a
head the rest of the way (overlapping them a bit so there is no gap) but it
would be nice to support this directly. I am not sure what the API should
be. Perhaps there can just be a parameter specifying how far along the
shaft the head (or, respectively, the tail) should be placed (as a fraction
of the arc length); if you want the midpoint you can specify 0.5.


Reply to this email directly or view it on GitHub
#262.

@byorgey
Copy link
Member Author

byorgey commented Sep 14, 2015

Right, so maybe the more general issue is that we need a nicer way to draw
arrowheads/tails/other markers independently of an arrow.

On 9:48am, Mon, Sep 14, 2015 Jeffrey Rosenbluth notifications@github.com
wrote:

More generally most vector graphics libraries allow markers to be placed
anywhere along a "path".
I believe most packages place the marker on top of the path, in contrast to
our arrow implementation,
in which the shaft is carefully connected to the arrowhead.

On Mon, Sep 14, 2015 at 10:08 AM Brent Yorgey notifications@github.com
wrote:

Sometimes one might like to draw arrows where the arrowhead shows up at
the midpoint of the shaft. For example, this style is often used to
indicate the orientation of edges in a directed graph. Currently this can
be hacked by e.g. drawing two arrows, one to the midpoint and one
without a
head the rest of the way (overlapping them a bit so there is no gap) but
it
would be nice to support this directly. I am not sure what the API should
be. Perhaps there can just be a parameter specifying how far along the
shaft the head (or, respectively, the tail) should be placed (as a
fraction
of the arc length); if you want the midpoint you can specify 0.5.


Reply to this email directly or view it on GitHub
#262.


Reply to this email directly or view it on GitHub
#262 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants