Package: cairo

Function cairo-set-line-width

Lambda List

cairo-set-line-width (cr width)

Arguments

cr -- a cairo-t context
width -- a double float with the line width

Details

Sets the current line width within the Cairo context. The line width value specifies the diameter of a pen that is circular in user space, though device-space pen may be an ellipse in general due to scaling/shear/rotation of the Coordinate Transformation Matrix (CTM).

As with the other stroke parameters, the current line width is examined by the cairo-stroke and cairo-stroke-extents functions, but does not have any effect during path construction.

The default line width value is 2.0.

Note

When the description above refers to user space and CTM it refers to the user space and CTM in effect at the time of the stroking operation, not the user space and CTM in effect at the time of the call to the cairo-set-line-width function. The simplest usage makes both of these spaces identical. That is, if there is no change to the CTM between a call to the cairo-set-line-width function and the stroking operation, then one can just pass user-space values to the cairo-set-line-width function and ignore this note.
 

See also

2021-12-12