Foxit PDF SDK

Public Types | Public Member Functions | Properties | List of all members
foxit.pdf.annots.DefaultAppearance Class Reference

Inherits SystemIDisposable.

## Public Types
enum | DefAPFlags { DefAPFlags.e_FlagFont = 0x0001, DefAPFlags.e_FlagTextColor = 0x0002, DefAPFlags.e_FlagFontSize = 0x0004 }
| Enumeration for default appearance flags. More...

## Public Member Functions
| DefaultAppearance (int flags, Font font, float text_size, int text_color)
| Constructor, with parameters. More...
| DefaultAppearance ()
| Constructor.
| DefaultAppearance (DefaultAppearance default_appearance)
| Constructor, with another default appearance object. More...
void | Set (int flags, Font font, float text_size, int text_color)
| Set value. More...

## Properties
int | flags`[get, set]`
| Flags to indicate which properties of default appearance are meaningful. More...
Font? | font`[get, set]`
| A font for default appearance. It should be a valid font object when it is useful. More...
int | text_color`[get, set]`
| Text color for default appearance. Format: 0xRRGGBB. More...
float | text_size`[get, set]`
| Text size for default appearance. More...

## Detailed Description

This class represents default appearance data, which is used for free text annotation and form.

## Member Enumeration Documentation

## ◆ DefAPFlags

enum foxit.pdf.annots.DefaultAppearance.DefAPFlags
| strong

Enumeration for default appearance flags.

Values of this enumeration can be used alone or in combination.

Enumerator
e_FlagFont | Indicates property font of foxit.pdf.annots.DefaultAppearance is meaningful.
e_FlagTextColor | Indicates property text color of foxit.pdf.annots.DefaultAppearance is meaningful.
e_FlagFontSize | Indicates property text size of foxit.pdf.annots.DefaultAppearance is meaningful.

## Constructor & Destructor Documentation

## ◆ DefaultAppearance() [1/2]

foxit.pdf.annots.DefaultAppearance.DefaultAppearance | ( | int | flags,
|  | Font | font,
|  | float | text_size,
|  | int | text_color
| ) |  |
| inline

Constructor, with parameters.

Parameters

  [in] | flags | Flags to indicate which properties of default appearance are meaningful. Please refer to values starting from foxit.pdf.annots.DefaultAppearance.DefAPFlags.e_FlagFont and this can be one or a combination of these values.
  [in] | font | A valid font object for default appearance when parameter flags includes foxit.pdf.annots.DefaultAppearance.DefAPFlags.e_FlagFont .
  [in] | text_size | Font size for default appearance when parameter flags includes foxit.pdf.annots.DefaultAppearance.DefAPFlags.e_FlagFontSize . Usually it should be above 0. For some objects, the size 0 has special meaning. Please refer to the comment of functions which are used to set default appearance data to other object.
  [in] | text_color | Text color for default appearance. Format: 0xRRGGBB.

## ◆ DefaultAppearance() [2/2]

foxit.pdf.annots.DefaultAppearance.DefaultAppearance | ( | DefaultAppearance | default_appearance | ) |
| inline

Constructor, with another default appearance object.

Parameters

  [in] | default_appearance | Another default appearance object.

## Member Function Documentation

## ◆ Set()

void foxit.pdf.annots.DefaultAppearance.Set | ( | int | flags,
|  | Font | font,
|  | float | text_size,
|  | int | text_color
| ) |  |
| inline

Set value.

Parameters

  [in] | flags | Flags to indicate which properties of default appearance are meaningful. Please refer to values starting from foxit.pdf.annots.DefaultAppearance.DefAPFlags.e_FlagFont and this can be one or a combination of these values.
  [in] | font | A font for default appearance. Please ensure this is a valid font object when parameter flags includes foxit.pdf.annots.DefaultAppearance.DefAPFlags.e_FlagFont .
  [in] | text_size | Font size for default appearance when parameter flags includes foxit.pdf.annots.DefaultAppearance.DefAPFlags.e_FlagFontSize . Usually it should be above 0. For some objects, the size 0 has special meaning. Please refer to the comment of functions which are used to set default appearance data to other object.
  [in] | text_color | Text color for default appearance. Format: 0xRRGGBB.

Returns
  None.

## Property Documentation

## ◆ flags

int foxit.pdf.annots.DefaultAppearance.flags
| get set

Flags to indicate which properties of default appearance are meaningful.

Please refer to values starting from foxit.pdf.annots.DefaultAppearance.DefAPFlags.e_FlagFont and this can be one or a combination of these values. 0 means no property of default appearance is meaningful.

## ◆ font

Font foxit.pdf.annots.DefaultAppearance.font
| get set

A font for default appearance. It should be a valid font object when it is useful.

Note
  Useful only when flags of current object includes foxit.pdf.annots.DefaultAppearance.DefAPFlags.e_FlagFont .

## ◆ text_color

int foxit.pdf.annots.DefaultAppearance.text_color
| get set

Text color for default appearance. Format: 0xRRGGBB.

Note
  Useful only when flags of current object includes foxit.pdf.annots.DefaultAppearance.DefAPFlags.e_FlagTextColor .

## ◆ text_size

float foxit.pdf.annots.DefaultAppearance.text_size
| get set

Text size for default appearance.

Usually it should be above 0 when it is useful. For some objects, the size 0 has special meaning. Please refer to the comment of functions which are used to set default appearance data to other object.

Note
  Useful only when flags of current object includes foxit.pdf.annots.DefaultAppearance.DefAPFlags.e_FlagFontSize .