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

Dashed line #6

Open
ischyrus opened this issue Jan 6, 2014 · 4 comments
Open

Dashed line #6

ischyrus opened this issue Jan 6, 2014 · 4 comments

Comments

@ischyrus
Copy link

ischyrus commented Jan 6, 2014

I could really use a dashed line, at least only for straight lines. Would that be an enhancement that could be added?

@jaquadro
Copy link
Owner

jaquadro commented Jan 6, 2014

I've thought about it on and off. There might be a decent texture-based approach, otherwise it's a more computationally expensive segmenting of the lines.

If you want dashed single line-segments, you could use the workaround of a striped texture brush and a texture matrix transform to align the texture to repeat the texture along the length of the line. Obviously won't work if you have a multi-segment path, straight or not.

@ischyrus
Copy link
Author

ischyrus commented Jan 8, 2014

I have several segments, I was thinking about just drawing lines along the path between points. I'm not really worried about the intersections lining up perfectly. It might not give the best performance, but in my scenario it's not a huge issue as the resulting texture is cached and the content isn't dynamic so it's just an initial loading cost. I'm also dealing with a relatively small number of these dashed lines.

@ischyrus
Copy link
Author

ischyrus commented Jan 8, 2014

It ended up working out pretty well:
untitled-1

@jaquadro
Copy link
Owner

jaquadro commented Jan 9, 2014

Great - if it does the job you need it to, that's what counts.

I will leave this issue open though, as I'm going to look more into it. I already laid some of the necessary groundwork that will be useful for things like path length gradients as well.

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