We can create shapes like rectangle, circle etc. Can we create a rectangle inside another rectangle?
Select an object, CONTROL C to copy it, then either Control V to paste it to center of artboard, or Control F to paste directly over and in front of the original.
Combining the shapes 1 Using the Selection tool ( ), click on the triangle shape if it is not selected, then Shift+click on the ellipse. 2 Select the Shape Builder tool ( ) in the Tools panel. Click and drag from one shape to another. The triangle and ellipse are combined into one shape.
Select all the shapes using the “Selection Tool”. While all the shapes are selected, select the “Pathfinder Tool” (displayed below in red). Now select the “Unite” selection (displayed below in green). Your shapes should now be combined to form a single shape.
You can't create a rectangle inside an other rectangle. But you can make 2 rectangles to look so.
You use the <rect> tag for rectangles. By looking at the rectangle description in the specifications, you can see that the content model don't allow <rect> to contain an other <rect> (or shape).
An example of what you can do :
<rect x="0" y="0" width="200" height="100"/>
<rect x="25" y="25" width="150" height="50"/>
You can also add a <g> around those two rectangles to group them, like this :
<g>
<rect x="0" y="0" width="200" height="100"/>
<rect x="25" y="25" width="150" height="50"/>
</g>
More explanations here : http://www.w3.org/TR/SVG/struct.html#Groups
You also have the alternative of using a path to draw 2 rectangles with only one tag. It all depend of your needs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With