//CurrentPoint reports the current point of the current path. //The current point is, conceptually, the final point reached by the path //so far. // //The current point is returned in the user-space coordinate system. // //If there is no defined current point, or if c is in an error state, //(ZP, false) will be returned. //Otherwise the (cp, true) will be returned where cp is the current point. // //Most path constructions alter the current point. // //Some functions use and alter the current point, but do not otherwise change //the current path, see ShowText. // //Some functions unset the current path, and, as a result, the current point, //such as Fill. // //Originally cairo_has_current_point and cairo_get_current_point. func (c *Context) CurrentPoint() (cp Point, defined bool) { has := C.cairo_has_current_point(c.c) == 1 if !has { return } var x, y C.double C.cairo_get_current_point(c.c, &x, &y) return cPt(x, y), true }
// cairo_bool_t cairo_has_current_point (cairo_t *cr); func (self *Surface) HasCurrentPoint() bool { return C.cairo_has_current_point(self.context) != 0 }