Context.setSourceRgba

void setSourceRgba(double red, double green, double blue, double alpha)

Sets the source pattern within cr to a translucent color. This color will then be used for any subsequent drawing operation until a new source pattern is set.

The color and alpha components are floating point numbers in the range 0 to 1. If the values passed in are outside that range, they will be clamped.

Note that the color and alpha values are not premultiplied.

The default source pattern is opaque black, (that is, it is equivalent to cairo_set_source_rgba(cr, 0.0, 0.0, 0.0, 1.0)).

Parameters

redred component of color
greengreen component of color
blueblue component of color
alphaalpha component of color