跳到主要内容

GetIconType

Gets icon type of this annotation.

Syntax

expression.GetIconType();

expression - A variable that represents a ApiTextAnnotation class.

Parameters

This method doesn't have any parameters.

Returns

TextIconType

Example

This example gets icon type of text annotation.

let doc = Api.GetDocument();
let textAnnot = Api.CreateTextAnnot([10, 10, 20, 20]);
textAnnot.SetContents("Annot contents");

let page = doc.GetPage(0);
page.AddObject(textAnnot);
console.log(`Text annot icon type is: ${textAnnot.GetIconType()}`);