Logo Search packages:      
Sourcecode: inkscape version File versions

void SPColor::set ( float  r,
float  g,
float  b 
)

Sets RGB values and colorspace in color.

Precondition:
0 <={r,g,b}<=1

Definition at line 131 of file color.cpp.

Referenced by sp_gradient_rebuild_vector(), sp_stop_init(), and sp_stop_set().

{
    g_return_if_fail(r >= 0.0);
    g_return_if_fail(r <= 1.0);
    g_return_if_fail(g >= 0.0);
    g_return_if_fail(g <= 1.0);
    g_return_if_fail(b >= 0.0);
    g_return_if_fail(b <= 1.0);

    // TODO clear icc if set?
    v.c[0] = r;
    v.c[1] = g;
    v.c[2] = b;
}


Generated by  Doxygen 1.6.0   Back to index