Lines Matching refs:symbol
77 #include "sp-symbol.h"
3055 * Convert objects to <symbol>. How that happens depends on what is selected:
3057 * 1) A random selection of objects will be embedded into a single <symbol> element.
3059 * 2) Except, a single <g> will have its content directly embedded into a <symbol>; the 'id' and
3060 * 'style' of the <g> are transferred to the <symbol>.
3063 * embedded into a <symbol> (with 'id' and 'style' transferred to <symbol>). This is because a
3064 * <symbol> cannot have a transform. (If the transform is a pure translation, the translation
3069 * Move objects inside symbol so bbox corner at 0,0 (see marker/pattern)
3087 desktop->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Select <b>objects</b> to convert to symbol."));
3134 // Create new <symbol>
3136 Inkscape::XML::Node *symbol_repr = xml_doc->createElement("svg:symbol");
3159 // Move selected items to new <symbol>
3170 // Create <use> pointing to new symbol (to replace the moved objects).
3188 DocumentUndo::done(doc, SP_VERB_EDIT_SYMBOL, _("Group to symbol"));
3192 * Convert <symbol> to <g>. All <use> elements referencing symbol remain unchanged.
3207 desktop->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Select a <b>symbol</b> to extract objects from."));
3211 SPObject* symbol = selection->single();
3214 // Require that we really have a <symbol>.
3215 if( symbol == NULL || !dynamic_cast<SPSymbol *>( symbol )) {
3216 desktop->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Select only one <b>symbol</b> in Symbol dialog to convert to group."));
3226 // Move all children of symbol to group
3227 std::vector<SPObject*> children = symbol->childList(false);
3229 // Converting a group to a symbol inserts a group for non-translational transform.
3230 // In converting a symbol back to a group we strip out the inserted group (or any other
3231 // group that only adds a transform to the symbol content).
3251 group->setAttribute("style", symbol->getAttribute("style"));
3252 group->setAttribute("class", symbol->getAttribute("class"));
3254 symbol->getAttribute("inkscape:transform-center-x"));
3256 symbol->getAttribute("inkscape:transform-center-y"));
3259 // Need to delete <symbol>; all <use> elements that referenced <symbol> should
3260 // auto-magically reference <g> (if <symbol> deleted after setting <g> 'id').
3261 Glib::ustring id = symbol->getAttribute("id");
3263 symbol->deleteObject(true);
3272 DocumentUndo::done(doc, SP_VERB_EDIT_UNSYMBOL, _("Group from symbol"));