Callbacks

ParseErrorFunc (start, end, error, *user_data)

PathForeachFunc (op, pts, n_pts, weight, *user_data)

Details

Gsk.ParseErrorFunc(start, end, error, *user_data)
Parameters:

Type of callback that is called when an error occurs during node deserialization.

Gsk.PathForeachFunc(op, pts, n_pts, weight, *user_data)
Parameters:
  • op (Gsk.PathOperation) – The operation

  • pts (Graphene.Point) – The points of the operation

  • n_pts (int) – The number of points

  • weight (float) – The weight for conic curves, or unused if not a conic curve

  • user_data (object or None) – The user data provided with the function

Returns:

True to continue iterating the path, False to immediately abort and not call the function again.

Return type:

bool

Prototype of the callback to iterate through the operations of a path.

For each operation, the callback is given the op itself, the points that the operation is applied to in pts, and a weight for conic curves. The n_pts argument is somewhat redundant, since the number of points can be inferred from the operation.

Each contour of the path starts with a Gsk.PathOperation.MOVE operation. Closed contours end with a Gsk.PathOperation.CLOSE operation.