Logo Search packages:      
Sourcecode: inkscape version File versions

void Inkscape::UI::ClipboardManagerImpl::copyPathParameter ( Inkscape::LivePathEffect::PathParam *  pp  )  [virtual]

Copy a Live Path Effect path parameter to the clipboard.

Parameters:
pp The path parameter to store in the clipboard

Implements Inkscape::UI::ClipboardManager.

Definition at line 272 of file clipboard.cpp.

References _clipboardSPDoc, _createInternalClipboard(), _discardInternalClipboard(), _doc, _root, _setClipboardTargets(), Inkscape::XML::Node::appendChild(), Inkscape::XML::Document::createElement(), Inkscape::GC::release(), and Inkscape::XML::Node::setAttribute().

{
    if ( pp == NULL ) return;
    gchar *svgd = sp_svg_write_path( pp->get_pathvector() );
    if ( svgd == NULL || *svgd == '\0' ) return;

    _discardInternalClipboard();
    _createInternalClipboard();

    Inkscape::XML::Node *pathnode = _doc->createElement("svg:path");
    pathnode->setAttribute("d", svgd);
    g_free(svgd);
    _root->appendChild(pathnode);
    Inkscape::GC::release(pathnode);

    fit_canvas_to_drawing(_clipboardSPDoc);
    _setClipboardTargets();
}


Generated by  Doxygen 1.6.0   Back to index