Is there any elegant way to create a rectangle with upper and lower strokes as dashes and straight lines
on the sides? The rectangle should have a fill color.
I have created the attached rectangle as one without stroke and proceeded to add individual four lines with pen tool.
Thanks & Best,
nib
elegant way?
Re: elegant way?
How you have done it, is the most straightforward procedure I can imagine.
What do you expect to be more "elegant"?
A special dialog which let you choose the stroke of all four sides idependently...?
Well, you could use a rectangle with dashed stroke and put only two full lines on top.
Snapping to the corner also might help for the alignment.
Maybe it's useful if you group the three or five objects if you plan to scale or move this rectangle around.
What do you expect to be more "elegant"?
A special dialog which let you choose the stroke of all four sides idependently...?
Well, you could use a rectangle with dashed stroke and put only two full lines on top.
Snapping to the corner also might help for the alignment.
Maybe it's useful if you group the three or five objects if you plan to scale or move this rectangle around.
Win7/64, Inkscape 0.92.2
Re: elegant way?
Thanks theozh,
Somehow I feel my method is bit crude. I was thinking on lines of (but it is not working)
1. Create a rectangle with stroke & fill.
2. Convert object into path.
3. Break Apart
3. Use Node tool. Select both top nodes. Convert into dashed line. Select bottom two nodes,
convert into dashed line.
Above doesn't work. I must be missing something.
Your suggestion is better than mine !
Thanks & Regards,
nib
Somehow I feel my method is bit crude. I was thinking on lines of (but it is not working)
1. Create a rectangle with stroke & fill.
2. Convert object into path.
3. Break Apart
3. Use Node tool. Select both top nodes. Convert into dashed line. Select bottom two nodes,
convert into dashed line.
Above doesn't work. I must be missing something.
Your suggestion is better than mine !
Thanks & Regards,
nib
Re: elegant way?
Well, your second approach would also work.
However, if you have a single path the command "Break apart" (Shift+Ctrl+K) will not break your path into individual segments. If you want to achieve this, you have to use the Node Tool (F2), mark all nodes and use "Break path at selected nodes". Then you can set the dashed strokes of the individual segments as you like.
But since your four sides are not a single connected path the enclosed rectangle will not be filled anymore.
For this you need a (closed) path, which you could achieve with a duplicate of your rectangle just without stroke but with fill. So, but then you are basically back to your first solution.
However, if you have a single path the command "Break apart" (Shift+Ctrl+K) will not break your path into individual segments. If you want to achieve this, you have to use the Node Tool (F2), mark all nodes and use "Break path at selected nodes". Then you can set the dashed strokes of the individual segments as you like.
But since your four sides are not a single connected path the enclosed rectangle will not be filled anymore.
For this you need a (closed) path, which you could achieve with a duplicate of your rectangle just without stroke but with fill. So, but then you are basically back to your first solution.
Win7/64, Inkscape 0.92.2