Package: cairo

Function cairo:set-source-rgb

Lambda List

cairo:set-source-rgb (cr red green blue)

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

Details

Sets the source pattern within the Cairo context to an opaque color. This opaque color will then be used for any subsequent drawing operation until a new source pattern is set. The color 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-rgb cr 0.0 0.0 0.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