Exemple #1
0
//RelCurveTo is a relative-coordinate version of CurveTo.
//All points are considered as vectors with an origin at the current point.
//
//If there is no current point, c is now in an error state.
//
//It is equivalent to
//	if p, ok := c.CurrentPoint(); ok {
//		c.CurveTo(p.Add(v1), p.Add(v2), p.Add(v3))
//	} else {
//		// c is broken now
//	}
//
//Originally cairo_rel_curve_to.
func (c *Context) RelCurveTo(v1, v2, v3 Point) *Context {
	x0, y0 := v1.c()
	x1, y1 := v2.c()
	x2, y2 := v3.c()
	C.cairo_rel_curve_to(c.c, x0, y0, x1, y1, x2, y2)
	return c
}
Exemple #2
0
func (self *Surface) RelCurveTo(dx1, dy1, dx2, dy2, dx3, dy3 float64) {
	C.cairo_rel_curve_to(self.context,
		C.double(dx1), C.double(dy1),
		C.double(dx2), C.double(dy2),
		C.double(dx3), C.double(dy3))
}