Foxit PDF SDK
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 watermark text properties object. More...
 
synchronized void delete ()
 Clean up related resources immediately. More...
 
int getAlignment ()
 Get text horizontal alignment. More...
 
long getColor ()
 Get text color. More...
 
Font getFont ()
 Get a font object 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 a font object 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
[in]fontA valid font object used for the text.
[in]font_sizeFont size in points.
[in]colorText color. Format: 0xRRGGBB.
[in]styleFont style. It should be one of the following values:
[in]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.
[in]alignmentText horizontal alignment. It should be one of the following values:

◆ WatermarkTextProperties() [2/2]

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

Constructor, with another watermark text properties object.

Parameters
[in]propertiesAnother watermark text properties object.

Member Function Documentation

◆ delete()

synchronized void com.foxit.sdk.pdf.WatermarkTextProperties.delete ( )

Clean up related resources immediately.

Returns
None.
Note
Once this function is called, current object cannot be used anymore.

◆ getAlignment()

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

Get text horizontal alignment.

It should be one of the following macro definitions:

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 a font object used for the text.

Returns
A font object 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 ( )

◆ 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
[in]fontA valid font object used for the text.
[in]font_sizeFont size in points.
[in]colorText color. Format: 0xRRGGBB.
[in]styleFont style. It should be one of the following values:
[in]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.
[in]alignmentText horizontal alignment. It should be one of the following values:
Returns
None.

◆ setAlignment()

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

Set text horizontal alignment.

It should be one of the following macro definitions:

Parameters
[in]valueText horizontal alignment.
Returns
None.

◆ setColor()

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

Set text color.

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

◆ setFont()

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

Set a font object used for the text.

Parameters
[in]valueA font object used for the text.
Returns
None.

◆ setFont_size()

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

Set font size in points.

Parameters
[in]valueFont 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:

Parameters
[in]valueFont 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]valueSpace between vertical center of lines, in line heights.
Returns
None.