Protocol

FxPathAPI_v2

The FxPathAPI_v2 protocol provides an interface that the host application implements to allow for retrieving information about paths, shapes, and masks the user has drawn on an object.

Declaration

@protocol FxPathAPI_v2

Overview

Use this protocol to get information about a path that the user has drawn on an object in the canvas. You can get the number of paths applied to the object,and then enumerate through them or pick a specific one.

This protocol also allows retrieval of the control points along the path and that information can then be used to guide the rendering of a plug-in.

This protocol is only available to FxPlug 3 plug-ins.

Topics

Getting Path Information

- numberOfPathsAtFxTime:

Returns the number of paths on the object to which your filter is applied, or on your generator.

Required.

- pathID:forIndex:error:

Returns the unique ID of the path at the index requested.

Required.

- name:ofPath:error:

Returns the name for the path with the given ID.

Required.

- isPath:open:atFxTime:error:

Tells whether the path is opened or closed.

Required.

- isPath:inverted:atFxTime:error:

Tells whether the path is inverted or not.

Required.

- style:ofPath:error:

Returns the style of the path: linear, bezier, or b-spline.

Required.

- length:ofPath:atFxTime:error:

Returns the length of the entire path.

Required.

- length:ofSegment:ofPath:atFxTime:error:

Returns the length of 1 segment of the entire path.

Required.

- numberOfVertices:inPath:atFxTime:error:

Returns the number of vertices in the specified path.

Required.

- vertex:atIndex:ofPath:atFxTime:error:

Returns information about a single vertex on the path at the given time.

Required.

- point:atPercentageOfDistance:alongPath:atTime:error:

Returns a 2D point containing its location on the path that is the specified percent along the path's length.

Required.

- point:atPercentageOfParameter:alongPath:atTime:error:

Returns a 2D point containing its location on the path at the specified percentage along the path’s parametric distance.

Required.

- blendMode:ofPath:error:

Gets the blending mode for a given path

Required.

- pathGeometryInfo:forPath:atTime:error:

Returns the geometry information for the specified path.

Required.

Setting Path Information

- setPath:toColor:error:

Sets the color the host application uses to draw the path with the specified ID.

Required.

See Also

Legacy Versions

FxPathAPI

The FxPathAPI protocol provides an interface that the host application implements to allow for retrieving information about paths, shapes, and masks the user has drawn on an object.