Renderers For Apple

Definitions for a rendering engine on Apple.
Definitions and functions in this module are included in fs_renderer_apple_r.h.
Module: Renderer
License Identifier: Renderer/All
Available License Right: Unnecessary. More...

Functions

FS_RESULT FSCRT_Renderer_CreateOnCGContext (CGContextRef context, FS_INT32 deviceClass, FSCRT_RENDERER *renderer)
 Create a renderer on an Apple quartz context. More...
 

Macro Definitions for Apple devices

#define FSCRT_APPLEDEVICE_DISPLAY   1
 Display device, like monitor.
 
#define FSCRT_APPLEDEVICE_PRINTER   2
 Raster based printers.
 

Detailed Description

Definitions for a rendering engine on Apple.
Definitions and functions in this module are included in fs_renderer_apple_r.h.
Module: Renderer
License Identifier: Renderer/All
Available License Right: Unnecessary.

Function Documentation

FS_RESULT FSCRT_Renderer_CreateOnCGContext ( CGContextRef  context,
FS_INT32  deviceClass,
FSCRT_RENDERER *  renderer 
)

Create a renderer on an Apple quartz context.

Renderer is a term of graphics engine in Foxit PDF SDK, it provides basic management and drawing operations as a common feature.
There are two approaches to use renderer: one is to draw on a renderer directly, the other is to output document contents by using a graphics context.
PDF module provides a rendering context to output page contents. Please refer to function FSPDF_RenderContext_Create.

Parameters
[in]contextHandle to a CGContextRef object which is an iOS/Mac device.
[in]deviceClassDevice class. Please refer to macro definitions FSCRT_APPLEDEVICE_XXX and this should be one of these macros.
[out]rendererPointer to a FSCRT_RENDERER handle that receives a new renderer object.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if the parameter context or renderer is NULL.
FSCRT_ERRCODE_UNRECOVERABLE if an unrecoverable error occurs.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or invalid memory access.
FSCRT_ERRCODE_ERROR if fail to create a renderer with the specified parameter context.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
Foxit PDF SDK will extend the supports on more platform-based native devices.
Attention
Thread Safety: this function is thread-safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term recoverable.
  • renderer: this handle is long-term recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.

Foxit Corporation