Protocol

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.

Declaration

@protocol FxPathAPI

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.

Topics

Get Path Geometry Information

- isPath:invertedAtTime:error:

Tells whether the path is inverted or not

Required.

- isPath:openAtTime:error:

Tells whether the path is opened or closed

Required.

- lengthOfPath:atTime:error:

Returns the length of the entire path

Required.

- lengthOfSegment:ofPath:atTime:error:

Returns the length of 1 segment of the entire path

Required.

- pointAtPercentageOfParameter:alongPath:atTime:error:

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

Required.

- pointAtPercentageOfDistance:alongPath:atTime:error:

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

Required.

- numberOfVerticesInPath:atTime:error:

Returns the number of vertices in the given path at the given time

Required.

- vertex:atIndex:ofPath:atTime:error:

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

Required.

Getting and Setting Path Information

- blendModeOfPath:error:

Gets the blending mode for a given path

Required.

- styleOfPath:error:

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

Required.

- setPath:color:error:

Sets the color the host app uses to draw the path with the given ID.

Required.

- nameOfPath:error:

Returns the name the user has entered for the path with the given ID

Required.

- numberOfPathsAtTime:

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

Required.

- pathIDForIndex:error:

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

Required.

Constants

FxPathBlendMode

Specifies the type of blending the user selected for the mask described by a particular path.

FxPathColor

Specifies the colors the host application can used to display a path to the user.

FxPathStyle

Specifies the style of the path: linear, bezier, or b-spline. This is used by the styleOfPath:error: method and the FxVertex structure.

FxVertex

Defines the properties of one vertex in a path.