Package: cairo

Function cairo:rel-line-to

Lambda List

cairo:rel-line-to (cr dx dy)

Arguments

cr -- a cairo:context-t instance
dx -- a number for the x offset to the end of the new line
dy -- a number for the y offset to the end of the new line

Details

Relative-coordinate version of the cairo:line-to function. Adds a line to the path from the current point to a point that is offset from the current point by (dx,dy) in user space. After this call the current point will be offset by (dx,dy).

Given a current point of (x,y),
(cairo:rel-line-to cr dx dy)  
is logically equivalent to
(cairo:line-to cr (+ x dx) (+ y dy))  
It is an error to call this function with no current point. Doing so will cause cr to shutdown with a :no-current-point status.

Notes

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

See also

2025-1-14