Logo Search packages:      
Sourcecode: inkscape version File versions

virtual Node* Inkscape::XML::Node::duplicate ( Document doc  )  const [pure virtual]

Create a duplicate of this node.

The newly created node has no parent, and a refcount equal 1. You need to manually insert it into the document, using e.g. appendChild(). Afterwards, call Inkscape::GC::release on it, so that it will be automatically collected when the parent is collected.

Parameters:
doc The document in which the duplicate should be created
Returns:
A pointer to the duplicated node

Implemented in Inkscape::XML::SimpleNode, and Inkscape::XML::SimpleNode.

Referenced by Inkscape::UI::ClipboardManagerImpl::_copyNode(), Inkscape::XML::SimpleNode::mergeFrom(), Inkscape::LayerVerb::perform(), sp_selection_copy_one(), and stamp_repr().


Generated by  Doxygen 1.6.0   Back to index