Package: cairo

Function cairo:source

Lambda List

cairo:source (cr)

Syntax

(cairo:source cr) => source
(setf (cairo:source cr) source)

Arguments

cr -- a cairo:context-t instance
source -- a cairo:pattern-t instance to be used as the source for subsequent drawing operations

Details

The cairo:source function gets the current source pattern for cr. This object is owned by Cairo. To keep a reference to it, you must call the cairo:pattern-reference function.

The (setf cairo:source) function sets the source pattern within cr to source. This pattern will then be used for any subsequent drawing operation until a new source pattern is set.

The default source pattern is a solid pattern that is opaque black, that is, it is equivalent to
(cairo:set-source-rgb cr 0.0 0.0 0.0)  

Notes

The current transformation matrix (CTM) of the pattern will be locked to the user space in effect at the time of the call of the (setf cairo:source) function. This means that further modifications of the CTM will not affect the source pattern. See the cairo:pattern-matrix function.
 

See also

2025-1-2