Foxit PDF SDK

Public Types | Public Member Functions | List of all members
foxit.addon.ofd.OFDRenderer Class Reference
Inheritance diagram for foxit.addon.ofd.OFDRenderer:

## Public Types
enum | ColorMode { ColorMode.e_ColorModeNormal = 0, ColorMode.e_ColorModeMappingGray = 1, ColorMode.e_ColorModeMapping = 2 }
| Enumeration for rendering color mode. More...
enum | ContentFlag { ContentFlag.e_ContentFlagAllContent = 0x00, ContentFlag.e_ContentFlagPage = 0x01, ContentFlag.e_ContentFlagAnnot = 0x02, ContentFlag.e_ContentFlagHighLightAnnots = 0x04, ContentFlag.e_ContentFlagStampAnnots = 0x08 }
| Enumeration for OFD rendering content flags. More...

## Public Member Functions
| OFDRenderer ()
| Constructor.
| OFDRenderer (Bitmap bitmap)
| Constructor, with a bitmap object. More...
| OFDRenderer (OFDRenderer other)
| Constructor, with another renderer object. More...
bool | IsEmpty ()
| Check whether current object is empty or not. More...
void | SetColorMode (OFDRenderer.ColorMode color_mode)
| Set the color mode. More...
void | SetContentFlag (int content_flag)
| Set the content flag. More...
Progressive | StartRender (OFDPage page, Matrix2D matrix)
| Start to render an OFD page. More...

## Detailed Description

This class is used to render an OFD page to a bitmap. Please ensure common.Library.InitializeOFDEngine has been called successfully before using this class.

See also
  foxit.common.Library

## Member Enumeration Documentation

## ◆ ColorMode

enum foxit.addon.ofd.OFDRenderer.ColorMode
| strong

Enumeration for rendering color mode.

Values of this enumeration should be used alone.

Enumerator
e_ColorModeNormal | Normal color mode.
e_ColorModeMappingGray | Map gray/white/black color value to background/foreground; for other colors, no change.
e_ColorModeMapping | Map a color value to the color range defined by a background color and a foreground color.

## ◆ ContentFlag

enum foxit.addon.ofd.OFDRenderer.ContentFlag
| strong

Enumeration for OFD rendering content flags.

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

Enumerator
e_ContentFlagAllContent | If set, all content will be rendered. This value should be used alone.
e_ContentFlagPage | If set, page content will be rendered.
e_ContentFlagAnnot | If set, annotations will be rendered.(Excluding highlight annotation and stamp)
e_ContentFlagHighLightAnnots | If set, highlight annotations will be rendered.
e_ContentFlagStampAnnots | If set, stamp annotations will be rendered.

## Constructor & Destructor Documentation

## ◆ OFDRenderer() [1/2]

foxit.addon.ofd.OFDRenderer.OFDRenderer | ( | Bitmap | bitmap | ) |
| inline

Constructor, with a bitmap object.

Parameters

  [in] | bitmap | A bitmap object. It should not be an empty bitmap.

## ◆ OFDRenderer() [2/2]

foxit.addon.ofd.OFDRenderer.OFDRenderer | ( | OFDRenderer | other | ) |
| inline

Constructor, with another renderer object.

Parameters

  [in] | other | Another renderer object.

## Member Function Documentation

## ◆ IsEmpty()

bool foxit.addon.ofd.OFDRenderer.IsEmpty | ( |  | ) |
| inline

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
  true means current object is empty, while false means not.

## ◆ SetColorMode()

void foxit.addon.ofd.OFDRenderer.SetColorMode | ( | OFDRenderer.ColorMode | color_mode | ) |
| inline

Set the color mode.

Parameters

  [in] | color_mode | Color mode. Please refer to values starting from foxit.addon.ofd.OFDRenderer.ColorMode.e_ColorModeNormal and this should be one of these values. The default value is foxit.addon.ofd.OFDRenderer.ColorMode.e_ColorModeNormal .

Returns
  None.

## ◆ SetContentFlag()

void foxit.addon.ofd.OFDRenderer.SetContentFlag | ( | int | content_flag | ) |
| inline

Set the content flag.

Parameters

  [in] | content_flag | Content flag. Please refer to values starting from foxit.addon.ofd.OFDRenderer.ContentFlag.e_ContentFlagAllContent and this can be one or a combination of these values. The default value is foxit.addon.ofd.OFDRenderer.ContentFlag.e_ContentFlagAllContent .

Returns
  None.

## ◆ StartRender()

Progressive foxit.addon.ofd.OFDRenderer.StartRender | ( | OFDPage | page,
|  | Matrix2D | matrix
| ) |  |
| inline

Start to render an OFD page.

This function is used to start to render an OFD page.

Parameters

  [in] | page | An OFD page object. It should not be an empty object.
  [in] | matrix | A matrix for rendering the page, which is usually returned by function OFDPage.GetDisplayMatrix .

Returns
  A progressive object. Please check the rate of current progress by function common.Progressive.GetRateOfProgress . If the rate is not 100 yet, call function common.Progressive.Continue to continue the progress until the progress is finished.