I want to create a rectangle/square with rounded corners, and then create a border within that perfectly "matches" the rounded corners of the outer shape. Is there a way to do this other than by eyeballing it? If I eyeball it, I can get it much closer than the the pictures below, but there has to be a better way to do this, right?? I've tried toggling the "scale corner radii" button, tried using inset/offset, tried a bunch of different stuff but I just can't figure it out. I'm sure its fairly simple but it just isn't clicking for me; any help is appreciated!
Start with the white square; white color stroke no fill.
Duplicate send to background: set blue color for Fill and Stroke. Adjust stroke thickness. If you want it as a single shape go Path->Stroke to Path - Path->Break apart - Path->Union.
Draw a rectangle and set the stroke width to 4mm. [ctrl+d] to duplicate. [shift+ctrl+7] opens the Path Effects dialog. [Add Live Path Effect > Offset]. Set [Join: Rounded] and set [Offset: 4mm] same as the stroke width. [ctrl+d] to duplicate again and set [Offset: 8mm]. [ctrl+d] to duplicate again and set [Offset: 12mm]. Repeat as much as you want, increasing the offset each time.
Slight clarification. For the inner rectangle, open the Fill and Stroke dialog [shift+ctrl+f] and set [Stroke style] [Join: Round join].
The second example uses [Path > Path Effects...] [Clone original] linked to the inner rectangle. Use the node tool [n] or rectangle tool [r] to move the inner control points. I guess I'm showing off here.
Draw a rectangle, filled but no stroke. Fill colour A. [Path > Linked Offset] or [alt+ctrl+j]. Fill colour B. Click the control point and [up_arrow] x 4. [Object > Lower to Bottom] [Edit > Duplicate] or [ctrl+d]. Fill colour A. Click the control point and [up_arrow] x 4. [Object > Lower to Bottom] [ctrl+d]. Fill colour B. Click the control point and [up_arrow] x 4. [Object > Lower to Bottom] [ctrl+d]. Fill colour A. Click the control point and [up_arrow] x 4. [Object > Lower to Bottom] [ctrl+d]. Fill colour B. Click the control point and [up_arrow] x 4. [Object > Lower to Bottom]
I'm sure you see the pattern here. Editing the original rectangle updates the duplicated linked shapes.
Edit: The third group renders perfectly in Inkscape but looks wrong in my browser.
HI,
I want to create a rectangle/square with rounded corners, and then create a border within that perfectly "matches" the rounded corners of the outer shape. Is there a way to do this other than by eyeballing it? If I eyeball it, I can get it much closer than the the pictures below, but there has to be a better way to do this, right?? I've tried toggling the "scale corner radii" button, tried using inset/offset, tried a bunch of different stuff but I just can't figure it out. I'm sure its fairly simple but it just isn't clicking for me; any help is appreciated!
Start with the white square; white color stroke no fill.
Duplicate send to background: set blue color for Fill and Stroke. Adjust stroke thickness. If you want it as a single shape go Path->Stroke to Path - Path->Break apart - Path->Union.
Draw a rectangle and set the stroke width to 4mm.
[ctrl+d] to duplicate. [shift+ctrl+7] opens the Path Effects dialog.
[Add Live Path Effect > Offset]. Set [Join: Rounded] and set [Offset: 4mm] same as the stroke width.
[ctrl+d] to duplicate again and set [Offset: 8mm].
[ctrl+d] to duplicate again and set [Offset: 12mm].
Repeat as much as you want, increasing the offset each time.
Slight clarification. For the inner rectangle, open the Fill and Stroke dialog [shift+ctrl+f] and set [Stroke style] [Join: Round join].
The second example uses [Path > Path Effects...] [Clone original] linked to the inner rectangle. Use the node tool [n] or rectangle tool [r] to move the inner control points. I guess I'm showing off here.
Simpler workflow.
Draw a rectangle, filled but no stroke. Fill colour A.
[Path > Linked Offset] or [alt+ctrl+j]. Fill colour B. Click the control point and [up_arrow] x 4. [Object > Lower to Bottom]
[Edit > Duplicate] or [ctrl+d]. Fill colour A.
Click the control point and [up_arrow] x 4. [Object > Lower to Bottom]
[ctrl+d]. Fill colour B.
Click the control point and [up_arrow] x 4. [Object > Lower to Bottom]
[ctrl+d]. Fill colour A.
Click the control point and [up_arrow] x 4. [Object > Lower to Bottom]
[ctrl+d]. Fill colour B.
Click the control point and [up_arrow] x 4. [Object > Lower to Bottom]
I'm sure you see the pattern here. Editing the original rectangle updates the duplicated linked shapes.
Edit: The third group renders perfectly in Inkscape but looks wrong in my browser.
thanks very much, great answers!
Notice that, as Papy_octet explained in another topic, you can set the exact amount of offset with xml editor.