Skip to main content

SetRectDiff

Sets annotation rect difference.

Syntax

expression.SetRectDiff(rectDiff);

expression - A variable that represents a ApiSquareAnnotation class.

Parameters

NameRequired/OptionalData typeDefaultDescription
rectDiffRequiredRectDiffA set of four numbers that shall describe the numerical differences between two rectangles.

Returns

boolean

Example

This example sets rect diff to square annotation.

let doc = Api.GetDocument();
let squareAnnot = Api.CreateSquareAnnot([10, 10, 160, 32]);
let page = doc.GetPage(0);
page.AddObject(squareAnnot);
squareAnnot.SetBorderEffectStyle("cloud");
squareAnnot.SetBorderEffectIntensity(1);
squareAnnot.SetRectDiff([10, 10, 10, 10]);
console.log(`Annot rect diff is: ${squareAnnot.GetRectDiff()}`);