SetRectDiff
Sets annotation rect difference.
Syntax
expression.SetRectDiff(rectDiff);
expression - A variable that represents a ApiSquareAnnotation class.
Parameters
| Name | Required/Optional | Data type | Default | Description |
|---|---|---|---|---|
| rectDiff | Required | RectDiff | A set of four numbers that shall describe the numerical differences between two rectangles. |
Returns
boolean
Example
This example sets rect diff to square annotation.
- Code
- Result
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()}`);