how to import that part of a vector that is inside a "page"

Post questions on how to use or achieve an effect in Inkscape.
Pony-Berserker
Posts: 19
Joined: Sun Dec 16, 2012 9:31 am

how to import that part of a vector that is inside a "page"

Postby Pony-Berserker » Wed Mar 20, 2013 4:20 am

So, I have a vector in file A. Let's say I'm making somehting in file B, and I want to import vector from file A, but not the whole vector, but exactly this part that is inside the "page". Is it possible? Or do I have to export to PNG, and then use the raster?

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: how to import that part of a vector that is inside a "pa

Postby brynn » Wed Mar 20, 2013 6:32 am

Unless you are using a Mac, you can copy from one file and paste into another. If you're using a Mac, there's a bug where pasting something turns it into raster. I'm not sure what to do if you're using a Mac. But let's cross that bridge if we have to -- are you using a Mac?

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: how to import that part of a vector that is inside a "pa

Postby Lazur » Wed Mar 20, 2013 7:16 am

On a mac, create a copy of file A, select the things to copy, invert selection, delete unnecessary object, save.
Then, opening file B, import copy of A.

Pony-Berserker
Posts: 19
Joined: Sun Dec 16, 2012 9:31 am

Re: how to import that part of a vector that is inside a "pa

Postby Pony-Berserker » Wed Mar 20, 2013 7:46 am

Lazur URH wrote:On a mac, create a copy of file A, select the things to copy, invert selection, delete unnecessary object, save.
Then, opening file B, import copy of A.


I don't have a mac, but that's what I'm doing at the moment - maybe I should've ask more precisely - is it possible without deleting unnecessary objects?
Because with deleting, I need to drag nodes to guides around pages, so nothing is left blank and nothing that's outside the page is imported. :/

But I guess it's impossible then...

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: how to import that part of a vector that is inside a "pa

Postby brynn » Wed Mar 20, 2013 8:24 am

If you're not using a Mac, then Copy from the original doc, and Paste into the new one! Note that if you have everything Grouped, you'll need to select only the object you want to copy (or cut, if you don't need it at all).

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: how to import that part of a vector that is inside a "pa

Postby ~suv » Wed Mar 20, 2013 9:31 am

Off topic:
brynn wrote:Unless you are using a Mac, you can copy from one file and paste into another.

brynn wrote:If you're not using a Mac, then Copy from the original doc, and Paste into the new one! (…)

JFYI: Inkscape users on Mac OS X can do this too, if the tip to work around the known conflict has been followed (it's simply one single checkbox which needs to be unchecked in the preferences of X11/XQuartz).

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: how to import that part of a vector that is inside a "pa

Postby brynn » Wed Mar 20, 2013 10:59 am

Off topic:
Thanks ~suv. I'll try to remember that.


I think I may have misunderstood the question. The title specifies, only "that part of the vector that is inside a page". You don't necessarily have to go the raster route. But somehow you'll need to isolate and copy the needed parts. It may require some path operation, or node editing. Or maybe clipping. It's hard to say without seeing the object and the page border. Can you show us the file, or an example file?

chriswww
Posts: 383
Joined: Fri Nov 19, 2010 3:04 pm

Re: how to import that part of a vector that is inside a "pa

Postby chriswww » Wed Mar 20, 2013 12:01 pm

What do you want to happen to objects in file A that straddle the inkscape page boundary? Should it clip or only include objects that are fully within page boundary? What is your skill level like with using the command line?...because you could set up (at least) an automatic clip of file A in imagemagick and script it to be overlayed (?) in file B. But there's many nitty gritty questions to be answered also as to exactly how this needs to behave and at what step of your (manual) inkscape operation you want this to happen. In theory you could do all of this in several scripting languages using various tools...but is that what you want?

Pony-Berserker
Posts: 19
Joined: Sun Dec 16, 2012 9:31 am

Re: how to import that part of a vector that is inside a "pa

Postby Pony-Berserker » Mon Mar 25, 2013 6:52 am

It doesn't really matter what's in and what's outside the page, - it was a general question.

In the meantime I found out that clipping everything that goes outside the psge borders might be clipped witha rectangle of size of the page. There was a problem though - it breks clips in the picutere. And then I found out it could be prevented by groupping the clips.

I think I should have asked more clearly anyway. sorry for bothering about that

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: how to import that part of a vector that is inside a "pa

Postby brynn » Mon Mar 25, 2013 10:59 am

Pony-Berserker wrote:It doesn't really matter what's in and what's outside the page, - it was a general question.

Oh, I see! It very much depends on the objects that are involved, and your goals for the image. Clipping might be a good way of handling the problem in general. But there are some drawbacks to that. I actually just ran into that problem myself.

What happens is that the image stays the same size as it was, with only the part inside the clipping path showing. So depending on how you use the image, you may have a white border between the clipping path and the original borders of the image (before clipping). And if you have very narrow restrictions about your ultimate goal....for example, you want to put it on a webpage, but the page is coded in a very specific way. Or maybe you want to upload it somewhere, where only the page size is recognized, so you have that white border. There are ways to get around that, of course. But in some situations, you may few or no choices about it.

So if you run into some problem in that area, you may want to go back and plow through some heavy duty node editing. Or depending on the objects on the borders, perhaps just ungrouping and deleting certain parts. In the end, it very much depends on the elements in the image, how the image and objects are made, and how you ultimately plan to use the finished image.

I certainly do wish that Inkscape could have a true cropping tool. Or maybe extension, that would literally chop off everything at the page border. And being an open source project, anyone can request new features. And actually, I'm pretty sure this has been a much requested new feature. If you want to look into it, go to Inkscape's Launchpad site and search for "cropping" or something like that. Then when you find the feature request, you can add your support to it ("This affects me too" button, or it's something like that.) (Note that new feature requests are submitted right alongside bug reports, so just search bugs.) https://launchpad.net/inkscape


Return to “Help with using Inkscape”