Foxit PDF SDK
|
Public Member Functions | |
def | Path () |
Constructor. More... | |
def | AppendEllipse (rect) |
Add an ellipse figure to the end of current path. More... | |
def | AppendRect (rect) |
Add a rectangle figure to the end of current path. More... | |
def | Clear () |
Clear all points. More... | |
def | CloseFigure () |
Close current figure (which is also the last figure in current path). More... | |
def | CubicBezierTo (point1, point2, point3) |
Add a cubic bezier spline to the end of current figure, by three points: two control points and one target point. More... | |
def | GetPoint (index) |
Get a point specified by index. More... | |
def | GetPointCount () |
Get the count of points. More... | |
def | GetPointType (index) |
Get the type of a point specified by index. More... | |
def | IncreasePointCount (count) |
Increase the point count and prepare adequate memory for these new points. More... | |
def | IsEmpty () |
Check whether current object is empty or not. More... | |
def | LineTo (point) |
Add a point to the end of current figure, and a line is to be drawn from current point to the new point. More... | |
def | MoveTo (point) |
Add a point to the end of current path, to start a new figure. More... | |
def | RemovePoint (index) |
Remove a point specified by index. More... | |
def | SetPoint (index, point, type) |
Change the value and type of a point specified by index. More... | |
def | Transform (matrix) |
Transform all points in current path with a given matrix. More... | |
Static Public Attributes | |
e_TypeBezierTo = _fsdk.Path_e_TypeBezierTo | |
Indicates that this point is a control point or ending point for a Bezier spline. | |
e_TypeBezierToCloseFigure = _fsdk.Path_e_TypeBezierToCloseFigure | |
Indicates that this point is the ending point for a Bezier spline, and this point will also be connected to the nearest FoxitPDFSDKPython2.Path.e_TypeMoveTo point before this point, in order to close current figure. | |
e_TypeLineTo = _fsdk.Path_e_TypeLineTo | |
Indicates that a line is drawn from the previous point to this point. | |
e_TypeLineToCloseFigure = _fsdk.Path_e_TypeLineToCloseFigure | |
Indicates that a line is drawn from the previous point to this point, and this point will also be connected to the nearest FoxitPDFSDKPython2.Path.e_TypeMoveTo point before this point, in order to close current figure. | |
e_TypeMoveTo = _fsdk.Path_e_TypeMoveTo | |
Indicates that the point is the first point of a figure. | |
This class represents a path which contains one or more figures.
def FoxitPDFSDKPython2.Path.Path | ( | ) |
Constructor.
Constructor, with another path object.
[in] | other | Another path object. |
def FoxitPDFSDKPython2.Path.AppendEllipse | ( | rect | ) |
Add an ellipse figure to the end of current path.
[in] | rect | The enclosing rectangle of an ellipse figure. |
def FoxitPDFSDKPython2.Path.AppendRect | ( | rect | ) |
Add a rectangle figure to the end of current path.
[in] | rect | A rectangle which specifies a rectangle figure. |
def FoxitPDFSDKPython2.Path.Clear | ( | ) |
Clear all points.
def FoxitPDFSDKPython2.Path.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:
If the last point's type is FoxitPDFSDKPython2.Path.e_TypeMoveTo , that means the last figure just has one point and cannot be closed and current function will return false.
If the last point's type is FoxitPDFSDKPython2.Path.e_TypeLineTo , the type will be changed to FoxitPDFSDKPython2.Path.e_TypeLineToCloseFigure .
If the last point's type is FoxitPDFSDKPython2.Path.e_TypeLineTo , the type will be changed to FoxitPDFSDKPython2.Path.e_TypeBezierToCloseFigure .
If the last point's type is already FoxitPDFSDKPython2.Path.e_TypeLineToCloseFigure or FoxitPDFSDKPython2.Path.e_TypeBezierToCloseFigure , that means the last figure has been closed. The type will not be changed and function will still return true.
def FoxitPDFSDKPython2.Path.CubicBezierTo | ( | point1, | |
point2, | |||
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".
[in] | point1 | New point as the first control point for cubic bezier, in [PDF coordinate system] (). |
[in] | point2 | New point as the second control point for cubic bezier, in [PDF coordinate system] (). |
[in] | point3 | New point as target point for cubic bezier, in [PDF coordinate system] (). |
def FoxitPDFSDKPython2.Path.GetPoint | ( | index | ) |
Get a point specified by index.
[in] | index | The index of the point. Valid range: 0 to (count-1). count is returned by function FoxitPDFSDKPython2.Path.GetPointCount . |
def FoxitPDFSDKPython2.Path.GetPointCount | ( | ) |
Get the count of points.
def FoxitPDFSDKPython2.Path.GetPointType | ( | index | ) |
Get the type of a point specified by index.
[in] | index | The index of the point. Valid range: 0 to (count-1). count is returned by function FoxitPDFSDKPython2.Path.GetPointCount . |
def FoxitPDFSDKPython2.Path.IncreasePointCount | ( | count | ) |
Increase the point count and prepare adequate memory for these new points.
This function will allocate more memory for given point count and initialize these new points with point (0, 0) and type FoxitPDFSDKPython2.Path.e_TypeMoveTo by default. After calling this function successfully, user can use function FoxitPDFSDKPython2.Path.SetPoint to set these new points.
[in] | count | The new point count. It should not be negative. |
def FoxitPDFSDKPython2.Path.IsEmpty | ( | ) |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
def FoxitPDFSDKPython2.Path.LineTo | ( | 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".
[in] | point | New point, in [PDF coordinate system] (). |
def FoxitPDFSDKPython2.Path.MoveTo | ( | 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".
[in] | point | New point, in [PDF coordinate system] (). |
def FoxitPDFSDKPython2.Path.RemovePoint | ( | index | ) |
Remove a point specified by index.
[in] | index | The index of the point to be removed. Valid range: 0 to (count-1). count is returned by function FoxitPDFSDKPython2.Path.GetPointCount . |
def FoxitPDFSDKPython2.Path.SetPoint | ( | index, | |
point, | |||
type | |||
) |
Change the value and type of a point specified by index.
[in] | index | The index of the point. Valid range: 0 to (count-1). count is returned by function FoxitPDFSDKPython2.Path.GetPointCount . |
[in] | point | The new point to set, in [PDF coordinate system] (). |
[in] | type | The type used to set to the new point. Please refer to values starting from FoxitPDFSDKPython2.Path.e_TypeMoveTo and this should be one of these values. |
def FoxitPDFSDKPython2.Path.Transform | ( | matrix | ) |
Transform all points in current path with a given matrix.
[in] | matrix | A matrix used for transforming. |