Logo Search packages:      
Sourcecode: inkscape version File versions

void sp_color_set_rgb_float ( SPColor color,
float  r,
float  g,
float  b 
)

Sets RGB values and colorspace in color.

Precondition:
color != NULL && 0 <={r,g,b}<=1

Definition at line 112 of file color.cpp.

References SPColor::c, SPColor::colorspace, and SPColor::v.

Referenced by objects_query_fillstroke(), and sp_style_clear().

{
    g_return_if_fail(color != NULL);
    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);

    color->colorspace = &RGB;
    color->v.c[0] = r;
    color->v.c[1] = g;
    color->v.c[2] = b;
    color->v.c[3] = 0;
}


Generated by  Doxygen 1.6.0   Back to index