Package: cairo

Function cairo-copy-path-flat

Lambda List

cairo-copy-path-flat (cr)

Arguments

cr -- a cairo-t context

Return Value

The copy of the cairo-path-t 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 structure. See the cairo-path-data-t structure for hints on how to iterate over the returned data structure.

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 elements of type :curve-to which will instead be replaced by a series of :line-to elements.

This function will always return a valid pointer, 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 :no-memory.
  • If cr is already in an error state. In this case path->status will contain the same status that would be returned by the cairo-status function.
 

See also

2021-12-12