|
From: Phil E. <spa...@ch...> - 2010-06-03 16:52:34
|
Dear Experts,
I am attempting to draw a simple dashed double line, i.e. something like
- - - - - - - - - - - - -
- - - - - - - - - - - - -
My first attempt used stroke -> dash -> stroke. This has two problems:
the lines wrap around the ends, and the dashes on the sides are not
aligned especially if the line is not straight:
- - - - - - - - - - - - - - - - -|
| - - - - - - - - - - - - - - - - -
Then I tried dash -> stroke -> stroke. This makes the two sides
aligned, but of course it adds ends to each segment:
+--+ +--+ +--+ +--+ +--+
| | | | | | | | | |
+--+ +--+ +--+ +--+ +--+
My final attempt was using contour to make a "left path" and a "right
path", and to dash and stroke them separately:
contour(width=+n) -> dash -> stroke
contour(width=-n) -> dash -> stroke
This doesn't work either, and I think I am probably misunderstanding
what contour should do to a non-closed path.
Alignment of the dashes on each side would be good but is not
essential. What is essential is not having stuff that wraps around the ends.
I think the easiest way to make this work would be if stroke had a way
to specify "none" as the cap style. Then I could do dash ->
stroke(cap=none) -> stroke. Is there some way to achieve that? Or can
someone suggest another way to do this?
Thanks, Phil.
|