15

I'm looking for a way to copy objects from one window to another without losing the surrounding transparency.

I have two Inkscape windows. The setup is pretty simple. In the first window I draw a filled circle and a filled rectangle in it, with the circle set on top of the rectangle to show that the area around the circle is transparent (that is, you can see the rectangle "under" the circle, see screenshot 1, left). In the second window I just drew a filled rectangle (screenshot 1, right).

Before

When I copy the circle from window 1 to window 2 the transparency around the circle is lost (screenshot 2).

After

I've verified that the backgrounds of the documents are 0% alpha/white.

This is a rather contrived example but is readily reproducible. The real graphics I am working with have a bunch of objects all in a single group, but I have the same results. I feel like I'm missing something. The circle no longer behaves like a circle at its destination. Instead, it acts kind of like a bitmap. I'm definitely not using the bitmap copy feature.

0

6 Answers 6

4

I had the same problem. It seems the objects that have been copy-pasted have a white background. I found a way to put objects into another window without that background:

  • save your first file (svg format)
  • go to the other window
  • import it (File -> Import)

This will import all objects that were in the first file, but you can delete the ones you don't need.

13

The underlying problem is that with current Inkscape packages for Mac OS X the pasted objects are indeed pasted as bitmap images (with a solid white background), instead of being pasted as vector copies of the original vector objects.

This is due to a known upstream conflict with the pasteboard syncing in X11/Xquartz: Copied vector objects are pasted as bitmap images, and no vector information (style, path) is available in other Inkscape commands either which expect vector data on the clipboard (e.g. paste style, paste size, 'Shape: from clipboard' in pencil/pen tools, 'Paste path' in the path effect editor, etc.)

Please adjust the X11 preferences for the pasteboard as described in the Inkscape FAQ: Copying and pasting in Inkscape creates pixellated images instead of copying the vector objects (and as seen in this screenshot). The changes will take effect immediately (no need to restart X11/XQuartz or Inkscape), but objects copied and pasted earlier will have to be redone.

1
  • Good job on revealing the root cause of this behaviour. Apr 23, 2013 at 18:17
10

In X11 preferences untick "Update Pasteboard when CLIPBOARD changes": enter image description here

Alternatively, you can use the shortcut Ctrl-D to duplicate the selected object as this doesn't touch the clipboard.

4
  • This solved it! You should add a comment about the normal behaviour results in copying a bitmap instead of the vectors as well. Jan 11, 2015 at 4:26
  • 1
    Thank you, and the ctrl-d trick is especially notable.
    – SMBiggs
    Jul 14, 2017 at 21:28
  • 1
    This is the right answer and should be the preferred one. You don't even have to restart Inkscape once you unticked this. Great solution, even after 4,5 years
    – user18783
    Oct 8, 2019 at 13:40
  • @user18783 haha, thanks for the reminder! I was facing this problem the other day (on a newer mac) and just worked around it a worse way because I had forgotten I'd ever solved it before.
    – matt burns
    Oct 13, 2019 at 20:50
0

I think you want to Clone the object instead of using Copy - when you Copy, Inkscape pastes as if it were a bitmap. Using Clone, I'm able to get the transparency I'd expect when overlapping an object.

1
  • Can you clone from one window to another? I haven't found a way. Jan 13, 2011 at 21:39
0

Try duplicating instead of copying.

I had this issue while trying to select multiple text boxes and copy them: the background between the text went opaque white. Instead of copying, I tried duplicating, and that gave me exactly what I wanted: a copy of all the text boxes in the same positions relative to each other with no background connecting them.

0

I’d rather comment this but I don’t have enough reputation: in addition to changing X11 clipboard preferences and ctrl+d you can also open the SVG file in a text editor (probably best to close it in Inkscape first) and copy and paste there.

To clarify a bit, SVG is a subset of XML, so the text editor should preferably be an XML editor.
Also, to be able to find the path/group you want to copy in the XML view of the document, in Inkscape look at what the ID of that path/group is and then search for that ID in the XML editor.

1
  • Well, you’ve posted this as an answer.   Rather than confessing that it’s not an answer, why not make it an answer by explaining what you’re talking about?  How do you “open the SVG file in a text editor … and copy and paste there”? Dec 31, 2019 at 4:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .