Package: cairo

Function cairo:set-source-rgba

Lambda List

cairo:set-source-rgba (cr red green blue alpha)

Arguments

cr -- a cairo:context-t instance
red -- a number for the red component of the color
green -- a number for the green component of the color
blue -- a number for the blue component of the color
alpha -- a number for the alpha component of the color

Details

Sets the source pattern within the Cairo context 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.0 to 1.0. If the values passed in are outside that range, they will be clamped.

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)  

Notes

The numbers for the arguments are coerced to double floats before being passed to the foreign C function.
 

See also

2025-1-2