Package: cairo

Function cairo:copy-path-flat

Lambda List

cairo:copy-path-flat (cr)

Arguments

cr -- a cairo:context-t instance

Return Value

The cairo:path-t instance with the copy of the current path. The caller owns the returned object and should call the cairo:path-destroy function when finished with it.

Details

Gets a flattened copy of the current path and returns it to the user as a cairo:path-t instance. See the cairo:path-data-t documentation for more information.

This function is like the cairo:copy-path function except that any curves in the path will be approximated with piecewise-linear approximations, accurate to within the current tolerance value. That is, the result is guaranteed to not have any :curve-to elements which will instead be replaced by a series of :line-to elements.

This function will always return a valid path, but the result will have no data, if either of the following conditions hold:
  • If there is insufficient memory to copy the path. In this case the status of the path will be set to the :no-memory value.
  • If cr is already in an error state. In this case the cairo:path-status function will return the same status that would be returned by the cairo:status function.
 

See also

2025-1-14