Package: cairo

Function cairo-get-current-point

Lambda List

cairo-get-current-point (cr)

Arguments

cr -- a cairo-t context

Return Value

x -- a double float x coordinate of the current point
y -- a double float y coordinate of the current point

Details

Gets the current point of the current path, which 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 cr is in an error status, x and y will both be set to 0.0. It is possible to check this in advance with the cairo-has-current-point function.

Most path construction functions alter the current point. See the following functions for details on how they affect the current point:
cairo-new-path           cairo-new-sub-path       cairo-append-path
cairo-close-path         cairo-move-to            cairo-line-to
cairo-curve-to           cairo-rel-move-to        cairo-rel-line-to
cairo-rel-curve-to       cairo-arc                cairo-arc-negative
cairo-rectangle          cairo-text-path          cairo-glyph-path
cairo-stroke-to-path  
Some functions use and alter the current point but do not otherwise change current path:
cairo-show-text  
Some functions unset the current path and as a result, current point:
cairo-fill               cairo-stroke  
 

See also

2021-12-12