Foxit PDF SDK

Public Types | Public Member Functions | Public Attributes | List of all members
foxit::pdf::DefaultAppearance Class Reference

Inherits Object.

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

## Public Member Functions
| DefaultAppearance ()
| Constructor.
| DefaultAppearance (const DefaultAppearance &default_appearance)
| Constructor, with another default appearance object. More...
| DefaultAppearance (uint32 flags, const common::Font &font, float text_size, RGB text_color)
| Constructor, with parameters. More...
bool | operator!= (const DefaultAppearance &default_appearance) const
| Not equal operator. More...
DefaultAppearance & | operator= (const DefaultAppearance &default_appearance)
| Assign operator. More...
bool | operator== (const DefaultAppearance &default_appearance) const
| Equal operator. More...
void | Set (uint32 flags, const common::Font &font, float text_size, RGB text_color)
| Set value. More...

## Public Attributes
uint32 | flags
| Flags to indicate which properties of default appearance are meaningful. More...
common::Font | font
| A font for default appearance. It should be a valid font object when it is useful. More...
RGB | text_color
| Text color for default appearance. Format: 0xRRGGBB. More...
float | text_size
| 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::DefaultAppearance::DefAPFlags

Enumeration for default appearance flags.

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

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

## Constructor & Destructor Documentation

## ◆ DefaultAppearance() [1/2]

foxit::pdf::DefaultAppearance::DefaultAppearance | ( | uint32 | flags,
|  | const common::Font & | font,
|  | float | text_size,
|  | RGB | 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 DefaultAppearance::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 DefaultAppearance::e_FlagFont.
  [in] | text_size | Font size for default appearance when parameter flags includes DefaultAppearance::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::DefaultAppearance::DefaultAppearance | ( | const DefaultAppearance & | default_appearance | ) |
| inline

Constructor, with another default appearance object.

Parameters

  [in] | default_appearance | Another default appearance object.

## Member Function Documentation

## ◆ operator!=()

bool foxit::pdf::DefaultAppearance::operator!= | ( | const DefaultAppearance & | default_appearance | ) | const
| inline

Not equal operator.

Parameters

  [in] | default_appearance | Another default appearance object. This function will check if current object is not equal to this one.

Returns
  true means not equal, while false means equal.

## ◆ operator=()

DefaultAppearance& foxit::pdf::DefaultAppearance::operator= | ( | const DefaultAppearance & | default_appearance | ) |
| inline

Assign operator.

Parameters

  [in] | default_appearance | Another default appearance object, whose value would be assigned to current object.

Returns
  Reference to current object itself.

## ◆ operator==()

bool foxit::pdf::DefaultAppearance::operator== | ( | const DefaultAppearance & | default_appearance | ) | const
| inline

Equal operator.

Parameters

  [in] | default_appearance | Another default appearance 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::DefaultAppearance::Set | ( | uint32 | flags,
|  | const common::Font & | font,
|  | float | text_size,
|  | RGB | text_color
| ) |  |
| inline

Set value.

Parameters

  [in] | flags | Flags to indicate which properties of default appearance are meaningful. Please refer to values starting from DefaultAppearance::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 DefaultAppearance::e_FlagFont.
  [in] | text_size | Font size for default appearance when parameter flags includes DefaultAppearance::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.

## Member Data Documentation

## ◆ flags

uint32 foxit::pdf::DefaultAppearance::flags

Flags to indicate which properties of default appearance are meaningful.

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

## ◆ font

common::Font foxit::pdf::DefaultAppearance::font

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 DefaultAppearance::e_FlagFont.

## ◆ text_color

RGB foxit::pdf::DefaultAppearance::text_color

Text color for default appearance. Format: 0xRRGGBB.

Note
  Useful only when flags of current object includes DefaultAppearance::e_FlagTextColor.

## ◆ text_size

float foxit::pdf::DefaultAppearance::text_size

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 DefaultAppearance::e_FlagFontSize.