Logo Search packages:      
Sourcecode: inkscape version File versions

void sp_style_unset_property_attrs ( SPObject o  ) 

Clear all style property attributes in object.

Definition at line 3780 of file style.cpp.

References SPStyle::color, SPStyle::enable_background, SPStyle::fill, SPStyle::fill_opacity, SPStyle::fill_rule, SPStyle::filter, SPTextStyle::font_family, SPTextStyle::font_specification, SPStyle::marker, SPStyle::opacity, SPIFilter::set, SPIString::set, SPILength::set, SPIEnum::set, SPIPaint::set, SPIScale24::set, Inkscape::XML::Node::setAttribute(), SPStyle::stroke, SPStyle::stroke_dasharray_set, SPStyle::stroke_dashoffset_set, SPStyle::stroke_linecap, SPStyle::stroke_linejoin, SPStyle::stroke_opacity, SPStyle::stroke_width, SPStyle::text, SPStyle::text_anchor, SPStyle::text_private, and SPStyle::writing_mode.

Referenced by sp_object_private_write().

{
    if (!o) return;

    SPStyle *style = SP_OBJECT_STYLE(o);
    if (!style) return;

    Inkscape::XML::Node *repr = SP_OBJECT_REPR(o);
    if (!repr) return;

    if (style->opacity.set) {
        repr->setAttribute("opacity", NULL);
    }
    if (style->color.set) {
        repr->setAttribute("color", NULL);
    }
    if (style->fill.set) {
        repr->setAttribute("fill", NULL);
    }
    if (style->fill_opacity.set) {
        repr->setAttribute("fill-opacity", NULL);
    }
    if (style->fill_rule.set) {
        repr->setAttribute("fill-rule", NULL);
    }
    if (style->stroke.set) {
        repr->setAttribute("stroke", NULL);
    }
    if (style->stroke_width.set) {
        repr->setAttribute("stroke-width", NULL);
    }
    if (style->stroke_linecap.set) {
        repr->setAttribute("stroke-linecap", NULL);
    }
    if (style->stroke_linejoin.set) {
        repr->setAttribute("stroke-linejoin", NULL);
    }
    if (style->marker[SP_MARKER_LOC].set) {
        repr->setAttribute("marker", NULL);
    }
    if (style->marker[SP_MARKER_LOC_START].set) {
        repr->setAttribute("marker-start", NULL);
    }
    if (style->marker[SP_MARKER_LOC_MID].set) {
        repr->setAttribute("marker-mid", NULL);
    }
    if (style->marker[SP_MARKER_LOC_END].set) {
        repr->setAttribute("marker-end", NULL);
    }
    if (style->stroke_opacity.set) {
        repr->setAttribute("stroke-opacity", NULL);
    }
    if (style->stroke_dasharray_set) {
        repr->setAttribute("stroke-dasharray", NULL);
    }
    if (style->stroke_dashoffset_set) {
        repr->setAttribute("stroke-dashoffset", NULL);
    }
    if (style->text_private && style->text->font_specification.set) {
        repr->setAttribute("-inkscape-font-specification", NULL);
    }
    if (style->text_private && style->text->font_family.set) {
        repr->setAttribute("font-family", NULL);
    }
    if (style->text_anchor.set) {
        repr->setAttribute("text-anchor", NULL);
    }
    if (style->writing_mode.set) {
        repr->setAttribute("writing_mode", NULL);
    }
    if (style->filter.set) {
        repr->setAttribute("filter", NULL);
    }
    if (style->enable_background.set) {
        repr->setAttribute("enable-background", NULL);
    }
}


Generated by  Doxygen 1.6.0   Back to index