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 with the x offset to the end of the new line
dy -- a number with 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.

Note

The numbers of the arguments are coerced to double float values before being passed to the C function.
 

See also

2024-2-24