How do I draw a line outwards from the exact middle of a rectangle's edge, and combine the paths in Inkscape?
How do I draw a line outwards from the exact middle of a rectangle's edge, and combine the paths in Inkscape?
Question
I want to draw this shape in Inkscape:
The line coming from the side needs to be aligned to exactly the middle of the edge, coming out at a right angle.
It must also be part of the rectangle object, so that when I alter the color or width of the line, I don't have to do it separately for either object (the line and the rectangle).
What is the simplest way of drawing a line outwards from the centre of a rectangles edge, and then combining the paths, in Inkscape?
Accepted Answer
Align and distribute
Draw a stroke and a box in random order
Select stroke to make it horizontal by adjusting its height to
0
in the top toolbarAdjust stroke style width (Object > Fill and Strike) to desired values
Choose Object > Align and Distribute tool
- relative to biggest object (or first selected depending on workflow)
- align right edges of the object to left edges of the anchor
- align center on the horizontal axis
Select both the line and the box to then choose Object > Group Ctrl D
Now changing fill or stroke of this group will affect all children