Logo Search packages:      
Sourcecode: inkscape version File versions

unsigned int sp_repr_set_css_double ( Inkscape::XML::Node repr,
gchar const *  key,
double  val 

Set a property attribute to val [slightly rounded], in the format required for CSS properties: in particular, it never uses exponent notation.

Definition at line 549 of file repr-util.cpp.

References Inkscape::XML::Node::setAttribute(), and Inkscape::CSSOStringStream::str().

Referenced by sp_feDiffuseLighting_write(), sp_fedistantlight_write(), sp_fepointlight_write(), sp_feSpecularLighting_write(), sp_fespotlight_write(), sp_gradient_repr_write_vector(), and sp_stop_write().

    g_return_val_if_fail(repr != NULL, FALSE);
    g_return_val_if_fail(key != NULL, FALSE);

    Inkscape::CSSOStringStream os;
    os << val;

    repr->setAttribute(key, os.str().c_str());
    return true;

Generated by  Doxygen 1.6.0   Back to index