foxit::pdf::annots::BorderInfo Class Reference

Inherits Object.

Public Types

enum  Style {
  e_Solid = 0, e_Dashed = 1, e_UnderLine = 2, e_Beveled = 3,
  e_Inset = 4, e_Cloudy = 5
}
 Enumeration for PDF annotation border style. More...
 

Public Member Functions

 BorderInfo (float width, Style style, float intensity, float dash_phase, const FloatArray &dashes)
 Constructor, with parameters. More...
 
 BorderInfo ()
 Constructor.
 
 BorderInfo (const BorderInfo &border_info)
 Constructor, with another border information object. More...
 
 ~BorderInfo ()
 Destructor.
 
bool operator!= (const BorderInfo &border_info) const
 Not equal operator. More...
 
BorderInfooperator= (const BorderInfo &border_info)
 Assign operator. More...
 
bool operator== (const BorderInfo &border_info) const
 Equal operator. More...
 
void Set (float width, Style style, float intensity, float dash_phase, const FloatArray &dashes)
 Set value. More...
 

Public Attributes

float cloud_intensity
 Intensity of the cloudy effect. More...
 
float dash_phase
 Dash phase. More...
 
FloatArray dashes
 A dash array that represents the dash patterns. More...
 
Style style
 Border style. Please refer to values starting from BorderInfo::e_Solid and this should be one of these values. Please also check comment of these values for more details.
 
float width
 Border width, in points. More...
 

Detailed Description

This class represents annotation border information.

Member Enumeration Documentation

◆ Style

Enumeration for PDF annotation border style.

Values of this enumeration should be used alone.

Enumerator
e_Solid 

Border style: Solid.

e_Dashed 

Border style: Dashed.

This is only useful for link, free text, line, square, circle, polygon, polyline and screen annotation. If this is set to other type annotation, Foxit PDF SDK will change to set border style as BorderInfo::e_Solid by default internally.

e_UnderLine 

Border style: Underline.

This is only useful for link annotation. If this is set to other type annotation, Foxit PDF SDK will change to set border style as BorderInfo::e_Solid by default internally.

e_Beveled 

Border style: Beveled.

Currently, Foxit PDF SDK does not support the annotation appearance of this border style. If this is set to any annotation, Foxit PDF SDK will change to set border style as BorderInfo::e_Solid by default internally.

e_Inset 

Border style: Inset.

Currently, Foxit PDF SDK does not support the annotation appearance of this border style. If this is set to any annotation, Foxit PDF SDK will change to set border style as BorderInfo::e_Solid by default internally.

e_Cloudy 

Border style: Cloudy.

This is only useful for free text, square, circle, and polygon annotations. If this is set to other type annotation, Foxit PDF SDK will change to set border style as BorderInfo::e_Solid by default internally.

Constructor & Destructor Documentation

◆ BorderInfo() [1/2]

foxit::pdf::annots::BorderInfo::BorderInfo ( float  width,
Style  style,
float  intensity,
float  dash_phase,
const FloatArray dashes 
)
inline

Constructor, with parameters.

Parameters
[in]widthBorder width, in points. This should be a non-negative value. If this value is 0, no border is drawn.
[in]styleBorder style. Please refer to values starting from BorderInfo::e_Solid and this should be one of these values.
[in]intensityIntensity of the cloudy effect. Only useful when parameter style is BorderInfo::e_Cloudy. Valid value range: 0 to 2. 0 means no cloudy border effect.
If the value is below 0, it will have the same effect as value 0. If the value is above 2, it will have the same effect as value 2.
[in]dash_phaseDash phase. Only useful when parameter style is BorderInfo::e_Dashed.
[in]dashesA dash array that represents the dash patterns. The value of each element in this array should not be negative. Only useful when style is BorderInfo::e_Dashed.

◆ BorderInfo() [2/2]

foxit::pdf::annots::BorderInfo::BorderInfo ( const BorderInfo border_info)
inline

Constructor, with another border information object.

Parameters
[in]border_infoAnother border information object.

Member Function Documentation

◆ operator!=()

bool foxit::pdf::annots::BorderInfo::operator!= ( const BorderInfo border_info) const
inline

Not equal operator.

Parameters
[in]border_infoAnother border information object. This function will check if current object is not equal to this one.
Returns
true means not equal, while false means equal.

◆ operator=()

BorderInfo& foxit::pdf::annots::BorderInfo::operator= ( const BorderInfo border_info)
inline

Assign operator.

Parameters
[in]border_infoAnother border information object, whose value would be assigned to current object.
Returns
Reference to current object itself.

◆ operator==()

bool foxit::pdf::annots::BorderInfo::operator== ( const BorderInfo border_info) const
inline

Equal operator.

Parameters
[in]border_infoAnother border information object. This function will check if current object is equal to this one.
Returns
true means equal, while false means not equal.

◆ Set()

void foxit::pdf::annots::BorderInfo::Set ( float  width,
Style  style,
float  intensity,
float  dash_phase,
const FloatArray dashes 
)
inline

Set value.

Parameters
[in]widthBorder width, in points. This should be a non-negative value. If this value is 0, no border is drawn.
[in]styleBorder style. Please refer to values starting from BorderInfo::e_Solid and this should be one of these values.
[in]intensityIntensity of the cloudy effect. Only useful when parameter style is BorderInfo::e_Cloudy. Valid value range: 0 to 2. 0 means no cloudy border effect.
If the value is below 0, it will have the same effect as value 0. If the value is above 2, it will have the same effect as value 2.
[in]dash_phaseDash phase. Only useful when parameter style is BorderInfo::e_Dashed.
[in]dashesA dash array that represents the dash patterns. The value of each element in this array should not be negative. Only useful when style is BorderInfo::e_Dashed.
Returns
None.

Member Data Documentation

◆ cloud_intensity

float foxit::pdf::annots::BorderInfo::cloud_intensity

Intensity of the cloudy effect.

This is only useful to free text, square, circle, and polygon annotations when style of current object is BorderInfo::e_Cloudy.
Suggested value range: 0 to 2. 0 means no cloudy border effect.
For rest value, their effect would be:

  • If the value is below 0, it will have the same effect as value 0.
  • If the value is above 2, it will have the same effect as value 2.

◆ dash_phase

float foxit::pdf::annots::BorderInfo::dash_phase

Dash phase.

Only useful when style of current object is BorderInfo::e_Dashed.

◆ dashes

FloatArray foxit::pdf::annots::BorderInfo::dashes

A dash array that represents the dash patterns.

Only useful when style of current object is BorderInfo::e_Dashed.
The value of elements in this array should not be negative.

◆ width

float foxit::pdf::annots::BorderInfo::width

Border width, in points.

This value should not be negative. If this value is 0, no border will be drawn.

Foxit Software Corporation Logo
@2019 Foxit Software Incorporated. All rights reserved.