crop multilayer

Post questions on how to use or achieve an effect in Inkscape.

crop multilayer

Postby embedded » Tue Nov 15, 2011 6:14 pm

Hello!

I have an image with multiple layers. Now i would like to make parts of the image to new svg files by cropping/extracting rect. areas from it.
But if i use the clip, each new file has 2 problems:
- they contain everything from the main file (but hidden)
- all the layers are joined into a single layer (not acceptable)

So is there any way to carve/extract/copy trough all layers and just a certain :tool_rectangle: area into a new file.
embedded
 
Posts: 6
Joined: Sat Sep 25, 2010 10:05 pm

Re: crop multilayer

Postby brynn » Tue Nov 15, 2011 10:44 pm

Possibly, but it might take a bit of work.
You'd have to use that rectangle (converted to path) and use a path operation, probably Path Intersection, on each layer, being careful to keep each duplicate of the rectangle exactly on top of each other, in all the layers.

But it depends on your image. You might not be able to do everything in a layer all at once, and instead, have to do it several times. Or in some cases, Path Intersection might not be the best operation to use. In some cases, you might have to resort to node editing to break the paths.

Or you could first make a copy of the entire file. Then instead of extracing areas and copy/paste to new file (which might wreak havoc with groups), you could possibly use Path Difference, to get rid of the unwanted parts of the copied file.

Can you show us the image? Or possibly the SVG file?
Basics:
> Help menu > Tutorials
> a Quick Guide to Inkscape
Manual:
> Inkscape: Guide to a Vector Drawing Program
Tutorials:
> Inkscape Community
Development news
> Google+
Gallery:
> Inkscape Community Gallery
User avatar
brynn
 
Posts: 6748
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA

Re: crop multilayer

Postby embedded » Thu Nov 17, 2011 3:05 am

Thank you for your reply. Unfortunately i cannot publish the file/image.

I decided to join the layer before cropping/cutting.

But still don't get it that how can i crop (not clip or mask) if i have multiple elements / paths and circles etc. underneath the area i want to crop ?
they are diff. color so they must stay separate areas.
embedded
 
Posts: 6
Joined: Sat Sep 25, 2010 10:05 pm

Re: crop multilayer

Postby brynn » Thu Nov 17, 2011 4:10 am

The reason I asked to see the file, was so that I could tell you which operations to use on which objects. All I can say is that you'll have to perform some path operation on each and every path/object. If you use Intersection, you might be able to do several objects at once. But all the other operations that might work, can only be done one at a time. (You can use Alt + click to select objects underneath.) The path operations are explained in Help menu > Tutorials > Advanced, and http://tavmjong.free.fr/INKSCAPE/MANUAL ... ining.html.

The only other way to do it, that I know of, would be to use a raster graphics program which has a true cropping tool.

I'm sorry, I wish I had a better idea. Maybe someone else can come up with something?
Basics:
> Help menu > Tutorials
> a Quick Guide to Inkscape
Manual:
> Inkscape: Guide to a Vector Drawing Program
Tutorials:
> Inkscape Community
Development news
> Google+
Gallery:
> Inkscape Community Gallery
User avatar
brynn
 
Posts: 6748
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA

Re: crop multilayer

Postby embedded » Thu Nov 17, 2011 4:52 am

I made a sample file. that you can see it's a kind of map. So clipping those objects does not really remove them and even exported to pdf with clip they stay there but hidden. no matter how large they are.

So I could not make any crop to those at same time, perhaps im stupid and too new user of inkscape.

but doing like you said, on each separately and using paste into place it worked...but too slow.
Attachments
cropsample.svg
sample
(5.27 KiB) Downloaded 16 times
embedded
 
Posts: 6
Joined: Sat Sep 25, 2010 10:05 pm

Re: crop multilayer

Postby brynn » Fri Nov 18, 2011 11:19 am

Does the text need to be cropped? Or will all the text essentially be copy/pasted? Does the text need to remain text? Or could it be converted to paths?

Yes, I was able to do what you want using Intersection. But because the objects don't all overlap, I had to do it once for each object.

Honestly, I don't know any other way. I know it's slow to do it that way. And I don't know why Inkscape doesn't have a traditional cropping tool. Someone else may have another idea?
Basics:
> Help menu > Tutorials
> a Quick Guide to Inkscape
Manual:
> Inkscape: Guide to a Vector Drawing Program
Tutorials:
> Inkscape Community
Development news
> Google+
Gallery:
> Inkscape Community Gallery
User avatar
brynn
 
Posts: 6748
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA

Re: crop multilayer

Postby embedded » Fri Nov 18, 2011 3:55 pm

Thank you. So I must use the intersection and and use the "mask" with paste into place each time with all cropped object. Bummer.
embedded
 
Posts: 6
Joined: Sat Sep 25, 2010 10:05 pm


Return to Help with using Inkscape

Who is online

Users browsing this forum: No registered users and 11 guests