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

guint32 SPColor::toRGBA32 ( gint  alpha ) const

Convert SPColor with integer alpha value to 32bit RGBA value.

Precondition:
alpha < 256

Definition at line 162 of file color.cpp.

Referenced by ColorWheelSelector::_colorChanged(), ColorICCSelector::_colorChanged(), ColorSelector::setColorAlpha(), sp_stop_get_rgba32(), sp_style_write_ipaint(), and toRGBA32().

{
    g_return_val_if_fail (alpha <= 0xff, 0x0);

    guint32 rgba = SP_RGBA32_U_COMPOSE( SP_COLOR_F_TO_U(v.c[0]),
                                        SP_COLOR_F_TO_U(v.c[1]),
                                        SP_COLOR_F_TO_U(v.c[2]),
                                        alpha );
    return rgba;
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index