com.foxit.sdk.pdf.WatermarkTextProperties Class Reference

Public Member Functions

 WatermarkTextProperties (Font font, float font_size, long color, int style, float line_space, int alignment)
 Constructor, with parameters.
More...
 
 WatermarkTextProperties ()
 Constructor.

 
 WatermarkTextProperties (WatermarkTextProperties properties)
 Constructor, with another WatermarkTextProperties object.
More...
 
int getAlignment ()
 Get text horizontal alignment. More...
 
long getColor ()
 Get text color. More...
 
Font getFont ()
 Get font used for the text. More...
 
float getFont_size ()
 Get font size in points. More...
 
int getFont_style ()
 Get font style. More...
 
float getLine_space ()
 Get space between vertical center of lines, in line heights. More...
 
void set (Font font, float font_size, long color, int style, float line_space, int alignment)
 Set value.
More...
 
void setAlignment (int value)
 Set text horizontal alignment. More...
 
void setColor (long value)
 Set text color. More...
 
void setFont (Font value)
 Set font used for the text. More...
 
void setFont_size (float value)
 Set font size in points. More...
 
void setFont_style (int value)
 Set font style. More...
 
void setLine_space (float value)
 Set space between vertical center of lines, in line heights. More...
 

Static Public Attributes

static final int e_FontStyleNormal = 0
 Watermark font style: normal.

 
static final int e_FontStyleUnderline = 1
 Watermark font style: with underline.

 

Detailed Description

This class represents the watermark text settings used to construct a Watermark object from text.

Constructor & Destructor Documentation

◆ WatermarkTextProperties() [1/2]

com.foxit.sdk.pdf.WatermarkTextProperties.WatermarkTextProperties ( Font  font,
float  font_size,
long  color,
int  style,
float  line_space,
int  alignment 
)

Constructor, with parameters.

Parameters
fontA valid Font object used for the text.
font_sizeFont size in points.
colorText color. Format: 0xRRGGBB.
styleFont style. It should be one of the following values:

e_FontStyleNormal
e_FontStyleUnderline

line_spaceSpace between vertical center of lines, in line heights. This value specifies the multiple of line heights for the space between vertical center of lines. Valid range: from 0 to 10 (not including 0 but including 10). If this value is above 10, 10 will be used as default for the text watermark.
alignmentText horizontal alignment. It should be one of the following values:

e_AlignmentLeft
e_AlignmentCenter
e_AlignmentRight

◆ WatermarkTextProperties() [2/2]

com.foxit.sdk.pdf.WatermarkTextProperties.WatermarkTextProperties ( WatermarkTextProperties  properties)

Constructor, with another WatermarkTextProperties object.

Parameters
propertiesAnother WatermarkTextProperties object.

Member Function Documentation

◆ getAlignment()

com.foxit.sdk.pdf.WatermarkTextProperties.getAlignment ( )

Get text horizontal alignment.

It should be one of the following macro definitions:


e_AlignmentLeft
e_AlignmentCenter
e_AlignmentRight

Returns
Text horizontal alignment.

◆ getColor()

com.foxit.sdk.pdf.WatermarkTextProperties.getColor ( )

Get text color.

Returns
Text color. Format: 0xRRGGBB.

◆ getFont()

com.foxit.sdk.pdf.WatermarkTextProperties.getFont ( )

Get font used for the text.

Returns
Font used for the text.

◆ getFont_size()

com.foxit.sdk.pdf.WatermarkTextProperties.getFont_size ( )

Get font size in points.

Returns
Font size in points.

◆ getFont_style()

com.foxit.sdk.pdf.WatermarkTextProperties.getFont_style ( )

Get font style.

It should be one of the following values:


e_FontStyleNormal
e_FontStyleUnderline

Returns
Font style.

◆ getLine_space()

com.foxit.sdk.pdf.WatermarkTextProperties.getLine_space ( )

Get space between vertical center of lines, in line heights.

This value is used to specify the multiple of line heights for the space between vertical center of lines. Valid range: from 0 to 10 (not including 0 but including 10). If this value is above 10, 10 will be used as default for the text watermark.

Returns
Space between vertical center of lines, in line heights.

◆ set()

void com.foxit.sdk.pdf.WatermarkTextProperties.set ( Font  font,
float  font_size,
long  color,
int  style,
float  line_space,
int  alignment 
)

Set value.

Parameters
fontA valid Font object used for the text.
font_sizeFont size in points.
colorText color. Format: 0xRRGGBB.
styleFont style. It should be one of the following values:

e_FontStyleNormal
e_FontStyleUnderline

line_spaceSpace between vertical center of lines, in line heights. This value specifies the multiple of line heights for the space between vertical center of lines. Valid range: from 0 to 10 (not including 0 but including 10). If this value is above 10, 10 will be used as default for the text watermark.
alignmentText horizontal alignment. It should be one of the following values:

e_AlignmentLeft
e_AlignmentCenter
e_AlignmentRight

Returns
None.

◆ setAlignment()

com.foxit.sdk.pdf.WatermarkTextProperties.setAlignment ( int  value)

Set text horizontal alignment.

It should be one of the following macro definitions:


e_AlignmentLeft
e_AlignmentCenter
e_AlignmentRight

Parameters
[in]alignmentText horizontal alignment.
Returns
None.

◆ setColor()

com.foxit.sdk.pdf.WatermarkTextProperties.setColor ( long  value)

Set text color.

Parameters
[in]colorText color. Format: 0xRRGGBB.
Returns
None.

◆ setFont()

com.foxit.sdk.pdf.WatermarkTextProperties.setFont ( Font  value)

Set font used for the text.

Parameters
[in]fontFont used for the text.
Returns
None.

◆ setFont_size()

com.foxit.sdk.pdf.WatermarkTextProperties.setFont_size ( float  value)

Set font size in points.

Parameters
[in]font_sizeFont size in points.
Returns
None.

◆ setFont_style()

com.foxit.sdk.pdf.WatermarkTextProperties.setFont_style ( int  value)

Set font style.

It should be one of the following values:


e_FontStyleNormal
e_FontStyleUnderline

Parameters
[in]font_styleFont style.
Returns
None.

◆ setLine_space()

com.foxit.sdk.pdf.WatermarkTextProperties.setLine_space ( float  value)

Set space between vertical center of lines, in line heights.

This value is used to specify the multiple of line heights for the space between vertical center of lines. Valid range: from 0 to 10 (not including 0 but including 10). If this value is above 10, 10 will be used as default for the text watermark.

Parameters
[in]line_spaceSpace between vertical center of lines, in line heights.
Returns
None.

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