Foxit PDF SDK
FSPath Class Reference
Inheritance diagram for FSPath:
FSBase

Instance Methods

(BOOL) - appendEllipse:
 Add an ellipse figure to the end of current path.
More...
 
(BOOL) - appendRect:
 Add a rectangle figure to the end of current path.
More...
 
(void) - clear
 Clear all points.
More...
 
(BOOL) - closeFigure
 Close current figure (which is also the last figure in current path).
More...
 
(BOOL) - cubicBezierTo:point2:point3:
 Add a cubic bezier spline to the end of current figure, by three points: two control points and one target point.
More...
 
(FSPointF *) - getPoint:
 Get a point specified by index.
More...
 
(int) - getPointCount
 Get the count of points.
More...
 
(FSPathPointType- getPointType:
 Get the type of a point specified by index.
More...
 
(id) - init
 Constructor.

 
(id) - initWithOther:
 Constructor, with another path object.
More...
 
(BOOL) - isEmpty
 Check whether current object is empty or not.
More...
 
(BOOL) - lineTo:
 Add a point to the end of current figure, and a line is to be drawn from current point to the new point.
More...
 
(BOOL) - moveTo:
 Add a point to the end of current path, to start a new figure.
More...
 
(BOOL) - removePoint:
 Remove a point specified by index.
More...
 
(BOOL) - setPoint:point:type:
 Change the value and type of a point specified by index.
More...
 
(void) - transform:
 Transform all points in current path with a given matrix.
More...
 

Detailed Description

This class represents a path which contains one or more figures.

Method Documentation

◆ appendEllipse:()

- (BOOL) appendEllipse: (FSRectF*)  rect

Add an ellipse figure to the end of current path.

Parameters
[in]rectThe enclosing rectangle of an ellipse figure.
Returns
YES means success, while NO means failure.

◆ appendRect:()

- (BOOL) appendRect: (FSRectF*)  rect

Add a rectangle figure to the end of current path.

Parameters
[in]rectA rectangle which specifies a rectangle figure.
Returns
YES means success, while NO means failure.

◆ clear()

- (void) clear

Clear all points.

Returns
None.

◆ closeFigure()

- (BOOL) closeFigure

Close current figure (which is also the last figure in current path).

When closing current figure, the last point's type may be changed:


Returns
YES means success, while NO means failure.

◆ cubicBezierTo:point2:point3:()

- (BOOL) cubicBezierTo: (FSPointF*)  point1
point2: (FSPointF*)  point2
point3: (FSPointF*)  point3 

Add a cubic bezier spline to the end of current figure, by three points: two control points and one target point.

If this function succeeds, parameter point3 will become the new "current point".

Parameters
[in]point1New point as the first control point for cubic bezier, in .
[in]point2New point as the second control point for cubic bezier, in .
[in]point3New point as target point for cubic bezier, in .
Returns
YES means success, while NO means failure.

◆ getPoint:()

- (FSPointF *) getPoint: (int)  index

Get a point specified by index.

Parameters
[in]indexThe index of the point. Valid range: 0 to (count-1). count is returned by function FSPath::getPointCount.
Returns
The specified point.

◆ getPointCount()

- (int) getPointCount

Get the count of points.

Returns
The count of points.

◆ getPointType:()

- (FSPathPointType) getPointType: (int)  index

Get the type of a point specified by index.

Parameters
[in]indexThe index of the point. Valid range: 0 to (count-1). count is returned by function FSPath::getPointCount.
Returns
The type of specified point. Please refer to values starting from FSPathTypeMoveTo and this would be one of these values.

◆ initWithOther:()

- (id) initWithOther: (FSPath*)  other

Constructor, with another path object.

Parameters
[in]otherAnother path object.

◆ isEmpty()

- (BOOL) isEmpty

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
YES means current object is empty, while NO means not.

◆ lineTo:()

- (BOOL) lineTo: (FSPointF*)  point

Add a point to the end of current figure, and a line is to be drawn from current point to the new point.

If this function succeeds, the new point will become the new "current point".

Parameters
[in]pointNew point, in .
Returns
YES means success, while NO means failure.

◆ moveTo:()

- (BOOL) moveTo: (FSPointF*)  point

Add a point to the end of current path, to start a new figure.

If this function succeeds, the new point will become the new "current point", and the new figure will become the new "current figure".

Parameters
[in]pointNew point, in .
Returns
YES means success, while NO means failure.

◆ removePoint:()

- (BOOL) removePoint: (int)  index

Remove a point specified by index.

Parameters
[in]indexThe index of the point to be removed. Valid range: 0 to (count-1). count is returned by function FSPath::getPointCount.
Returns
YES means success, while NO means failure.

◆ setPoint:point:type:()

- (BOOL) setPoint: (int)  index
point: (FSPointF*)  point
type: (FSPathPointType type 

Change the value and type of a point specified by index.

Parameters
[in]indexThe index of the point. Valid range: 0 to (count-1). count is returned by function FSPath::getPointCount.
[in]pointThe new point to set, in .
[in]typeThe type used to set to the new point. Please refer to values starting from FSPathTypeMoveTo and this should be one of these values.
Returns
YES means success, while NO means failure.

◆ transform:()

- (void) transform: (FSMatrix2D*)  matrix

Transform all points in current path with a given matrix.

Parameters
[in]matrixA matrix used for transforming.
Returns
None.