Foxit PDF SDK
FSInk Class Reference
Inheritance diagram for FSInk:
FSMarkup FSAnnot FSBase

Instance Methods

(void) - enableUseBezier:
 Enable to use bezier spline to generate ink path for ink annotation's appearance.
More...
 
(id) - init
 Constructor.

 
(id) - initWithAnnot:
 Constructor, with parent class object.
More...
 
- Instance Methods inherited from FSMarkup
(FSNote *) - addReply
 Add a new reply to the end of reply list.
More...
 
(void) - addRichText:style:
 Add a new rich text string to the end.
More...
 
(FSNote *) - addStateAnnot:model:state:
 Add a new state annotation.
More...
 
(FSMarkupArray *) - getGroupElements
 Get an element (as markup annotation) from the group that current markup annotation belongs to.
More...
 
(FSMarkup *) - getGroupHeader
 Get the header annotation (as primary annotation) of the group that current markup annotation belongs to.
More...
 
(FSNote *) - getReply:
 Get a reply by index.
More...
 
(int) - getReplyCount
 Count all replies.
More...
 
(NSString *) - getRichTextContent:
 Get text string of a rich text string specified by index.
More...
 
(int) - getRichTextCount
 Get the count of rich text string.
More...
 
(FSRichTextStyle *) - getRichTextStyle:
 Get style data of a rich text string specified by index.
More...
 
(FSNoteArray *) - getStateAnnots:
 Get all state annotations in a specified state model.
More...
 
(void) - insertRichText:content:style:
 Insert a new rich text string to the place which is specified by index.
More...
 
(BOOL) - isGrouped
 Check whether current markup annotation is in a group or not.
More...
 
(BOOL) - removeAllReplies
 Remove all the replies.
More...
 
(BOOL) - removeAllStateAnnots
 Remove all the state annotations.
More...
 
(BOOL) - removeReply:
 Remove a reply by index.
More...
 
(void) - removeRichText:
 Remove a rich text string specified by index.
More...
 
(void) - setRichTextContent:content:
 Set text string of a rich text string specified by index.
More...
 
(void) - setRichTextStyle:style:
 Set style data of a rich text string specified by index.
More...
 
(BOOL) - ungroup
 Ungroup current markup annotation from the group it belongs to.
More...
 
- Instance Methods inherited from FSAnnot
(FSPDFStream *) - getAppearanceStream:appearance_state:
 Get annotation's appearance stream with specified type and state.
More...
 
(FSRectI *) - getDeviceRect:
 Get annotation rectangle in device coordinate system.
More...
 
(FSPDFDictionary *) - getDict
 Get annotation's dictionary object.
More...
 
(FSMatrix2D *) - getDisplayMatrix:
 Get the display matrix, from PDF coordinate system to targeted device coordinate system.
More...
 
(int) - getIndex
 Get the index of current annotation in the page which current annotation belongs to.
More...
 
(FSPDFDictionary *) - getOptionalContent
 Get the PDF dictionary of annotation's optional content.
More...
 
(FSPDFPage *) - getPage
 Get the related PDF page.
More...
 
(FSRectF *) - getRect
 Get rectangle, in PDF coordinate system.
More...
 
(FSAnnotType- getType
 Get actual annotation type of current annotation.
More...
 
(BOOL) - hasProperty:
 Whether current annotation has the specified annotation's property.
More...
 
(id) - initWithPage:annot_dict:
 Constructor, with PDF page and annotation's PDF dictionary.
More...
 
(BOOL) - isEmpty
 Check whether current object is empty or not.
More...
 
(BOOL) - isMarkup
 Check if current annotation is a markup annotation.
More...
 
(BOOL) - move:
 Move current annotation to a new position, specified by a new rectangle in PDF coordinate system.
More...
 
(BOOL) - removeProperty:
 Remove a specified annotation's property.
More...
 
(BOOL) - resetAppearanceStream
 Reset appearance stream.
More...
 

Properties

FSPathinkList
 Get or Set ink list data.
More...
 
- Properties inherited from FSMarkup
FSDateTimecreationDateTime
 Get or Set creation date time.

 
NSString * intent
 Get or Set intent name.
More...
 
float opacity
 Get or Set opacity value.
More...
 
FSPopuppopup
 Get or Set related pop-up annotation.
More...
 
NSString * subject
 Get or Set subject string.

 
NSString * title
 Get or Set title string.
More...
 
- Properties inherited from FSAnnot
unsigned int borderColor
 Get or Set border color.
More...
 
FSBorderInfoborderInfo
 Get or Set border information.
More...
 
NSString * content
 Get or Set content.

 
unsigned int flags
 Get or Set annotation flags.

 
FSDateTimemodifiedDateTime
 Get or Set last modified date time.

 
NSString * uniqueID
 Get or Set unique ID.

 

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 FSInk is derived from class FSMarkup , offers functions to get/set ink annotation's properties and also and reset appearance stream of an ink annotation.
For a 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 FSAnnot::resetAppearanceStream (inherited from FSInk '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 = FSBorderInfoSolid, border color = 0xFFFF0000 (red), opacity = 1.0.
See also
FSMarkup

Method Documentation

◆ enableUseBezier:()

- (void) enableUseBezier: (BOOL)  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.

◆ initWithAnnot:()

- (id) initWithAnnot: (FSAnnot*)  annot

Constructor, with parent class object.

Parameters
[in]annotParent class object.

Reimplemented from FSMarkup.

Property Documentation

◆ inkList

- (FSPath *) inkList
readwritenonatomicweak

Get or 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 FSPath is used to represent the ink list data, but the point types for path object have been specially simplified for ink list. Only FSPathTypeMoveTo and FSPathTypeLineTo types are used for points in the ink list:

  • a point with type FSPathTypeMoveTo means that this point is the start point of a stroked path. Usually the first in path object should be this type.
  • a point with type FSPathTypeLineTo means that this point is in a stroked path, which is started by a point with type FSPathTypeMoveTo, and when function FSAnnot::resetAppearanceStream (inherited from Ink's parent class) is called, Foxit PDF SDK will connect this point with other points by curves.

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.