Foxit PDF SDK
fsdk.Ink Class Reference

Public Member Functions

def EnableUseBezier (use_bezier)
 Enable to use bezier spline to generate ink path for ink annotation's appearance. More...
 
def GetInkList ()
 Get ink list data. More...
 
def SetInkList (ink_list)
 Set ink list data. More...
 

Detailed Description

An ink annotation represents a freehand "scribble" composed of one or more disjoint paths.
Ink annotation is a kind of markup annotation, so class Ink is derived from class Markup , offers functions to get/set ink annotation's properties and also and reset appearance stream of an ink annotation.
For an ink annotation, ink list property is required. So please ensure that an ink annotation has valid ink list property before resetting its appearance stream; otherwise the ink annotation cannot be reset appearance stream.

Note
For a newly created ink annotation, if user calls function fsdk.Annot.ResetAppearanceStream (inherited from Ink 's parent class) directly after setting required ink list property and not setting any other properties, the default appearance will be used:
border width = 2.0, border style = fsdk.BorderInfoE_Solid , border color = 0xFFFF0000 (red), opacity = 1.0.
See also
Markup

Member Function Documentation

◆ EnableUseBezier()

def fsdk.Ink.EnableUseBezier (   use_bezier)

Enable to use bezier spline to generate ink path for ink annotation's appearance.

If this function is not called, Foxit PDF SDK will use bezier spline to generate ink path by default.

Parameters
[in]use_bezierA boolean to decide whether to use bezier spline or not: true means to use bezier spline to generate ink path, while false means to use straight line to connect adjacent points to generate ink path.
Returns
None.

◆ GetInkList()

def fsdk.Ink.GetInkList ( )

Get ink list data.

Ink list property is required for an ink annotation and this property has effect on ink annotation's appearance. The ink list contains one or more stroked path.
In Foxit PDF SDK, class fsdk.Path is used to represent the ink list data, but the point types for path object have been specially simplified for ink list. Only fsdk.PathE_TypeMoveTo and fsdk.PathE_TypeLineTo types are used for points in the ink list:

Operations such as move the ink annotation, or set a new ink path to this annotation will update the ink path data, so that the previous returned path object would become invalid. In this case, user should call this function again to obtain the new path object.

Returns
The ink list data. If the return value of function fsdk.Path.IsEmpty for the returned path object is true, that means no ink list data can be found.

◆ SetInkList()

def fsdk.Ink.SetInkList (   ink_list)

Set ink list data.

Ink list property is required for an ink annotation and this property has effect on ink annotation's appearance. The ink list contains one or more stroked path.
In Foxit PDF SDK, class fsdk.Path is used to represent the ink list data, but the point types for path object have been specially simplified for ink list. Only fsdk.PathE_TypeMoveTo and fsdk.PathE_TypeLineTo types are used for points in the ink list:

Specially, if input parameter ink_list contains bezier points (for example, added by function fsdk.Path.CubicBezierTo ), the control points will be ignored and only the target point will be used in the ink list data.
User is strongly recommended to pass a valid path object only with point types fsdk.PathE_TypeMoveTo and fsdk.PathE_TypeLineTo .
If user wants the effect to be shown in annotation's appearance, please call function fsdk.Annot.ResetAppearanceStream after this function.

Parameters
[in]ink_listNew path object which specifies the new list data.
Returns
None.