Show / Hide Table of Contents

Class Ink

An ink annotation (PDF 1.3) represents a freehand “scribble” composed of one or more disjoint paths. When opened, it shall display a pop-up window containing the text of the associated note.

Inheritance
System.Object
Annot
Markup
Ink
Implements
System.IDisposable
Inherited Members
Markup.GetTitle()
Markup.SetTitle(String)
Markup.GetPopup()
Markup.SetPopup(Popup)
Markup.GetOpacity()
Markup.SetOpacity(Double)
Markup.GetSubject()
Markup.SetSubject(String)
Markup.GetCreationDates()
Markup.SetCreationDates(Date)
Markup.GetBorderEffect()
Markup.SetBorderEffect(Markup.BorderEffect)
Markup.GetBorderEffectIntensity()
Markup.SetBorderEffectIntensity(Double)
Markup.GetInteriorColor()
Markup.GetInteriorColorCompNum()
Markup.SetInteriorColor(ColorPt, Int32)
Markup.GetContentRect()
Markup.SetContentRect(Rect)
Markup.GetPadding()
Markup.SetPadding(Rect)
Markup.RotateAppearance(Double)
Annot.Dispose()
Annot.Dispose(Boolean)
Annot.GetHandleInternal()
Annot.GetRefHandleInternal()
Annot.CreateInternal(IntPtr, Object)
Annot.Create(SDFDoc, Annot.Type, Rect)
Annot.op_Assign(Annot)
Annot.Equals(Object)
Annot.IsValid()
Annot.GetSDFObj()
Annot.GetType()
Annot.IsMarkup()
Annot.GetRect()
Annot.GetVisibleContentBox()
Annot.SetRect(Rect)
Annot.GetContents()
Annot.SetContents(String)
Annot.GetPage()
Annot.SetPage(Page)
Annot.GetUniqueID()
Annot.SetUniqueID(String)
Annot.GetDate()
Annot.SetDate(Date)
Annot.GetFlag(Annot.Flag)
Annot.SetFlag(Annot.Flag, Boolean)
Annot.GetBorderStyle()
Annot.SetBorderStyle(Annot.BorderStyle)
Annot.GetAppearance()
Annot.GetAppearance(Annot.AnnotationState)
Annot.GetAppearance(Annot.AnnotationState, String)
Annot.SetAppearance(Obj)
Annot.SetAppearance(Obj, Annot.AnnotationState)
Annot.SetAppearance(Obj, Annot.AnnotationState, String)
Annot.RemoveAppearance()
Annot.RemoveAppearance(Annot.AnnotationState)
Annot.RemoveAppearance(Annot.AnnotationState, String)
Annot.Flatten(Page)
Annot.GetActiveAppearanceState()
Annot.SetActiveAppearanceState(String)
Annot.GetColorAsRGB()
Annot.GetColorAsCMYK()
Annot.GetColorAsGray()
Annot.GetColorCompNum()
Annot.SetColor(ColorPt, Int32)
Annot.SetColor(ColorPt)
Annot.GetStructParent()
Annot.SetStructParent(Int32)
Annot.GetOptionalContent()
Annot.SetOptionalContent(Obj)
Annot.Resize(Rect)
Annot.GetRotation()
Annot.SetRotation(Int32)
Annot.RefreshAppearance()
Annot.GetCustomData(String)
Annot.SetCustomData(String, String)
Annot.DeleteCustomData(String)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: pdftron.PDF.Annots
Assembly: PDFNetAndroid.dll
Syntax
public class Ink : Markup, IDisposable

Constructors

Ink(Annot)

Creates an Ink annotation and initialize it using given annotation object.

Declaration
public Ink(Annot ann)
Parameters
Type Name Description
Annot ann

the annot

Remarks

The constructor does not copy any data, but is instead the logical equivalent of a type cast.

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

Ink(Obj)

Creates an Ink annotation and initialize it using given Cos/SDF object.

Declaration
public Ink(Obj d)
Parameters
Type Name Description
Obj d

the d

Remarks

The constructor does not copy any data, but is instead the logical equivalent of a type cast.

Methods

Create(SDFDoc, Rect)

Creates a new Ink annotation, in the specified document.

Declaration
public static Ink Create(SDFDoc doc, Rect pos)
Parameters
Type Name Description
SDFDoc doc

A document to which the Ink annotation is added.

Rect pos

A rectangle specifying the Ink annotation's bounds, specified in user space coordinates.

Returns
Type Description
Ink

A newly created blank Ink annotation.

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

Erase(Point, Point, Double)

Erase a rectangle area formed by pt1pt2 with width

Declaration
public bool Erase(Point pt1, Point pt2, double eraserHalfWidth)
Parameters
Type Name Description
Point pt1

A point object that is one end of the eraser segment.

Point pt2

A point object that is the other end of the eraser segment.

System.Double eraserHalfWidth

The half width of the eraser.

Returns
Type Description
System.Boolean

Whether an ink stroke was erased.

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

Finalize()

Releases all resources used by the Ink

Declaration
protected void Finalize()

GetHighlightIntent()

Retrieves whether the Ink will draw like a highlighter.

Declaration
public bool GetHighlightIntent()
Returns
Type Description
System.Boolean

true if the Ink will draw like a highlighter. (multiply blend mode) If false it will draw in normal mode. (normal blend mode)

GetPathCount()

Gets number of stroked pathes in the InkList.

Declaration
public int GetPathCount()
Returns
Type Description
System.Int32

An integer representing the number of pathes in the Ink list.

Remarks

The Ink list is An array of n arrays, each representing a stroked path. Each array shall be a series of Point objects specifying points along the path. When drawn, the points shall be connected by straight lines or curves in an implementation-dependent way.

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

GetPoint(Int32, Int32)

Gets the specific point in the Ink List.

Declaration
public Point GetPoint(int pathindex, int pointindex)
Parameters
Type Name Description
System.Int32 pathindex

An unsigned integer indicating the index of the stroked path

System.Int32 pointindex

An unsigned integer indicating the index of the point within the stroked path indicated by the parameter "pathindex".

Returns
Type Description
Point

A Point object that is located by "pathindex" and "pointindex".

Remarks

The Ink list is An array of n arrays, each representing a stroked path. Each array shall be a series of Point objects specifying points along the path. When drawn, the points shall be connected by straight lines or curves in an implementation-dependent way.

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

GetPointCount(Int32)

Gets number of points in a certain stroked path in the InkList.

Declaration
public int GetPointCount(int pathindex)
Parameters
Type Name Description
System.Int32 pathindex

An unsigned integer indicating the index of the stroked path, the number of points within whom is of our interest.

Returns
Type Description
System.Int32

An integer representing the number of points in the stroked path of the Ink list.

Remarks

The Ink list is An array of n arrays, each representing a stroked path. Each array shall be a series of Point objects specifying points along the path. When drawn, the points shall be connected by straight lines or curves in an implementation-dependent way.

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

SetHighlightIntent(Boolean)

Enables or disables the Ink drawing like a highlighter.

Declaration
public void SetHighlightIntent(bool highlight)
Parameters
Type Name Description
System.Boolean highlight

true if the Ink will draw like a highlighter. (multiply blend mode) If false it will draw in normal mode. (normal blend mode)

SetPoint(Int32, Int32, Point)

Sets the specific point in the Ink List.

Declaration
public void SetPoint(int pathindex, int pointindex, Point pt)
Parameters
Type Name Description
System.Int32 pathindex

An unsigned integer indicating the index of the stroked path

System.Int32 pointindex

An unsigned integer indicating the index of the point within the stroked path indicated by the parameter "pathindex".

Point pt

A Point object that is to be located by "pathindex" and "pointindex".

Remarks

The Ink list is An array of n arrays, each representing a stroked path. Each array shall be a series of Point objects specifying points along the path. When drawn, the points shall be connected by straight lines or curves in an implementation-dependent way.

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

Implements

System.IDisposable
In This Article
Back to top Generated by DocFX