Name
ccontext:CopyPathFlat -- copy flattened version of path
Synopsis
handle = ccontext:CopyPathFlat()
Function
Gets a flattened copy of the current path and returns it to the user as a Cairo path object. Use cpath:Get() to get the individual path members.

This function is like ccontext:CopyPath() 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 #CAIRO_PATH_CURVE_TO which will instead be replaced by a series of #CAIRO_PATH_LINE_TO elements.

This function will always return a valid handle, but the result will have no data, if either of the following conditions hold:

  1. If there is insufficient memory to copy the path. In this case the path status will be set to #CAIRO_STATUS_NO_MEMORY.
  2. If the Cairo context is already in an error state. In this case the path status will contain the same status that would be returned by ccontext:Status().

This function returns the copy of the current path. The caller owns the returned object and should call cpath:Free() when finished with it.

Inputs
none

Results
handle
the copy of the current path

Show TOC