跳到主要内容

SetStartStyle

设置线条起点样式。

语法

expression.SetStartStyle(style);

expression - 表示 ApiLineAnnotation 类的变量。

参数

名称必需/可选数据类型默认值描述
style必需LineEndStyle线条起始端点的样式。

返回值

boolean

示例

自定义 PDF 中线条注释的起始外观。

// How do I change the start style in a PDF?

// Apply a specific line beginning to the annotation in a PDF.

let doc = Api.GetDocument();
let lineAnnot = Api.CreateLineAnnot([10, 10, 160, 32], {x: 15, y: 15}, {x: 155, y: 30});
lineAnnot.SetStartStyle("rClosedArrow");
let page = doc.GetPage(0);
page.AddObject(lineAnnot);
console.log(`Start style set to: ${lineAnnot.GetStartStyle()}`);