Hide rectangel behind another
Hide rectangel behind another
I have two rectangles, no fill (because I want the background to show through). One is shifted down and left. How can I make the parts that are "inside" the other rectangle hidden? So that if I reposition, they appear again?
Re: Hide rectangel behind another
Hi.
Make a clipping object from the one with no fill.
To do that, convert it to path (Ctrl+Shift+C), duplicate it (Ctrl+D), scale it up, reverse path direction -or mirror it-,
and combine it with the original.
That will result in a path that has a "hole" inside where the original transparent rectangle was.
You can add any colour fill to it.
Then, move it to the top (Home), add other rectangle to selection, and set clipping.
Once clipping being set you can select the clipped object inside, with the node editor tool, and move it aroud,
and it will be transparent where the other rectangle was.
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Clip-Clipping.html
Make a clipping object from the one with no fill.
To do that, convert it to path (Ctrl+Shift+C), duplicate it (Ctrl+D), scale it up, reverse path direction -or mirror it-,
and combine it with the original.
That will result in a path that has a "hole" inside where the original transparent rectangle was.
You can add any colour fill to it.
Then, move it to the top (Home), add other rectangle to selection, and set clipping.
Once clipping being set you can select the clipped object inside, with the node editor tool, and move it aroud,
and it will be transparent where the other rectangle was.
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Clip-Clipping.html
Re: Hide rectangel behind another
Sorry, it doesn't work. I start with rects.svg and end up with rects2.svg (both attached). in the latter, the page seems to be empty, but there's an empty clip in it.
- Attachments
-
- rects2.svg
- (2.64 KiB) Downloaded 148 times
-
- rects.svg
- (2.12 KiB) Downloaded 148 times
Re: Hide rectangel behind another
Hmm one step I may missed: put the mask to be clipped inside a group (Ctrl+G).
In the attached svg it seems working what you are after if I understood it right.
By double clicking on the clipped rectangle, you can enter the group, and once entered you can move it around, and a part of it will be hidden.
Make a larger clipping mask if you want to move the clipped object further from the other rectangle.
Other than that missing step the previous method was used.
In the attached svg it seems working what you are after if I understood it right.
By double clicking on the clipped rectangle, you can enter the group, and once entered you can move it around, and a part of it will be hidden.
Make a larger clipping mask if you want to move the clipped object further from the other rectangle.
Other than that missing step the previous method was used.
- Attachments
-
- rects3.svg
- (3.5 KiB) Downloaded 150 times
Re: Hide rectangel behind another
sorry again. i tried to follow your steps and also work with the file you attached and it doesn't work for me. any simpler way?
Re: Hide rectangel behind another
Can't think of other possibilities for a live solution.
I had in mind how the vector files could be improved with adding options out of the svg specification for compositing, but it seems with inkscape it won't happen.
Either I'm missing your point -could think of another one-, or you missing this solution.
So does the rects3.svg appear without any changes in position of the objects as it should look?
I had in mind how the vector files could be improved with adding options out of the svg specification for compositing, but it seems with inkscape it won't happen.
Either I'm missing your point -could think of another one-, or you missing this solution.
So does the rects3.svg appear without any changes in position of the objects as it should look?
Last edited by Lazur URH on Sun Mar 30, 2014 9:29 am, edited 1 time in total.
-
- Posts: 2344
- Joined: Sun Apr 14, 2013 12:04 pm
- Location: Michigan, USA
Re: Hide rectangel behind another
I can't find a dynamic solution... but it's fairly easy to use some duplicates and the Exclusion tool to knit the paths and then delete the segments where you like.
(Hide the originals in a layer for future use.)
(Hide the originals in a layer for future use.)
- Attachments
-
- ittayd-question-3.svg
- (6.67 KiB) Downloaded 161 times
Have a nice day.
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/