Logo Search packages:      
Sourcecode: inkscape version File versions  Download package

void sp_lineargradient_set_position ( SPLinearGradient lg,
gdouble  x1,
gdouble  y1,
gdouble  x2,
gdouble  y2 
)

Directly set properties of linear gradient and request modified.

Definition at line 1541 of file sp-gradient.cpp.

References SPLinearGradient::x1, SPLinearGradient::x2, SPLinearGradient::y1, and SPLinearGradient::y2.

{
    g_return_if_fail(lg != NULL);
    g_return_if_fail(SP_IS_LINEARGRADIENT(lg));

    /* fixme: units? (Lauris)  */
    lg->x1.set(SVGLength::NONE, x1, x1);
    lg->y1.set(SVGLength::NONE, y1, y1);
    lg->x2.set(SVGLength::NONE, x2, x2);
    lg->y2.set(SVGLength::NONE, y2, y2);

    SP_OBJECT(lg)->requestModified(SP_OBJECT_MODIFIED_FLAG);
}


Generated by  Doxygen 1.6.0   Back to index