Class: AnnotBorderStyle

Core.PDFNet. AnnotBorderStyle


new AnnotBorderStyle()

AnnotBorderStyle structure specifies the characteristics of the annotation's border. The border is specified as a rounded rectangle.

Extends

Members


<static> Style

Properties:
Name Type Description
e_solid number
e_dashed number
e_beveled number
e_inset number
e_underline number

Methods


<static> create(s, b_width [, b_hr] [, b_vr])

Creates a new border style with given parameters.
Parameters:
Name Type Argument Description
s number
PDFNet.AnnotBorderStyle.Style = {
	e_solid : 0
	e_dashed : 1
	e_beveled : 2
	e_inset : 3
	e_underline : 4
}
The border style.
b_width number The border width expressed in the default user space.
b_hr number <optional>
The horizontal corner radius expressed in the default user space.
b_vr number <optional>
The vertical corner radius expressed in the default user space. Note: If the corner radii are 0, the border has square (not rounded) corners; if the border width is 0, no border is drawn.
Returns:
A promise that resolves to an object of type: "PDFNet.AnnotBorderStyle"
Type
Promise.<Core.PDFNet.AnnotBorderStyle>

<static> createWithDashPattern(s, b_width, b_hr, b_vr, b_dash)

Creates a new border style with given parameters.
Parameters:
Name Type Description
s number
PDFNet.AnnotBorderStyle.Style = {
	e_solid : 0
	e_dashed : 1
	e_beveled : 2
	e_inset : 3
	e_underline : 4
}
The border style.
b_width number The border width expressed in the default user space.
b_hr number The horizontal corner radius expressed in the default user space.
b_vr number The vertical corner radius expressed in the default user space.
b_dash Array.<number> An array of numbers defining a pattern of dashes and gaps to be used in drawing the border. The dash array is specified in the same format as in the line dash pattern parameter of the graphics state except that the phase is assumed to be 0. Note: If the corner radii are 0, the border has square (not rounded) corners; if the border width is 0, no border is drawn.
Returns:
A promise that resolves to an object of type: "PDFNet.AnnotBorderStyle"
Type
Promise.<Core.PDFNet.AnnotBorderStyle>

compare(b)

Comparison function. Determines if parameter object is equal to current object.
Parameters:
Name Type Description
b Core.PDFNet.AnnotBorderStyle
Returns:
A promise that resolves to True if the two objects are equivalent, False otherwise
Type
Promise.<boolean>

copy()

Copy Constructor
Returns:
A promise that resolves to an object of type: "PDFNet.AnnotBorderStyle"
Type
Promise.<Core.PDFNet.AnnotBorderStyle>

destroy()

Destructor
Inherited From:
Returns:
Type
Promise.<void>

getDashPattern()

See:
  • BorderStyle()
Returns:
A promise that resolves to the border dash pattern.
Type
Promise.<Float64Array>

getHR()

Returns:
A promise that resolves to horizontal corner radius.
Type
Promise.<number>

getStyle()

Returns:
A promise that resolves to the border style.
Type
Promise.<number>
Example
Return value enum:
<pre>
PDFNet.AnnotBorderStyle.Style = {
	e_solid : 0
	e_dashed : 1
	e_beveled : 2
	e_inset : 3
	e_underline : 4
}
</pre>

getVR()

Returns:
A promise that resolves to vertical corner radius.
Type
Promise.<number>

getWidth()

Returns:
A promise that resolves to the border width.
Type
Promise.<number>

setHR(horizontal_radius)

Sets horizontal corner radius.
Parameters:
Name Type Description
horizontal_radius number A number representing the value of the horizontal radius to set the annotation to.
Returns:
Type
Promise.<void>

setStyle(style)

Sets the border style.
Parameters:
Name Type Description
style number
PDFNet.AnnotBorderStyle.Style = {
	e_solid : 0
	e_dashed : 1
	e_beveled : 2
	e_inset : 3
	e_underline : 4
}
Returns:
Type
Promise.<void>

setVR(vertical_radius)

Sets vertical corner radius.
Parameters:
Name Type Description
vertical_radius number A number representing the value of the vertical radius to set the annotation to.
Returns:
Type
Promise.<void>

setWidth(width)

Sets the border width
Parameters:
Name Type Description
width number A number representing the width value to set the annotation to.
Returns:
Type
Promise.<void>

takeOwnership()

Take the ownership of this object, so that PDFNet.runWithCleanup won't destroy this object.
Inherited From:
Returns:
Type
void