Package: cairo

Function cairo:rel-curve-to

Lambda List

cairo:rel-curve-to (cr dx1 dy1 dx2 dy2 dx3 dy3)

Arguments

cr -- a cairo:context-t instance
dx1 -- a number for the x offset to the first control point
dy1 -- a number for the y offset to the first control point
dx2 -- a number for the x offset to the second control point
dy2 -- a number for the y offset to the second control point
dx3 -- a number for the x offset to the end of the curve
dy3 -- a number for the y offset to the end of the curve

Details

Relative-coordinate version of the cairo:curve-to function. All offsets are relative to the current point. Adds a cubic Bézier spline to the path from the current point to a point offset from the current point by (dx3,dy3), using points offset by (dx1,dy1) and (dx2,dy2) as the control points. After this call the current point will be offset by (dx3,dy3).

Given a current point of (x,y),
(cairo:rel-curve-to cr dx1 dy1 dx2 dy2 dx3 dy3)  
is logically equivalent to
(cairo:curve-to cr (+ x dx1) (+ y dy1)
                   (+ x dx2) (+ y dy2)
                   (+ x dx3) (+ y dy3))  
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