Definitions for a rendering engine.
Definitions and functions in this module are included in fs_renderer_r.h.
Module: Renderer
License Identifier: Renderer/All
Available License Right: Unnecessary.
More...
Modules | |
| 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. | |
| Renderer For Windows | |
| Definitions for a rendering engine on windows. Definitions and functions in this module are included in fs_renderer_windows_r.h. Module: Renderer License Identifier: Renderer/All Available License Right: Unnecessary. | |
Classes | |
| struct | FSCRT_RENDERER |
| Handle type for a renderer. More... | |
Functions | |
| FS_RESULT | FSCRT_Renderer_CreateOnBitmap (FSCRT_BITMAP bitmap, FSCRT_RENDERER *renderer) |
| Create a renderer on a bitmap object. More... | |
| FS_RESULT | FSCRT_Renderer_Release (FSCRT_RENDERER renderer) |
| Release a given renderer object. More... | |
| FS_RESULT | FSCRT_Renderer_SetFlags (FSCRT_RENDERER renderer, FS_DWORD flags) |
| Set flags of a renderer. More... | |
| FS_RESULT | FSCRT_Renderer_SetDitherBits (FSCRT_RENDERER renderer, FS_INT32 bits) |
| Set bitmap dither bits of a renderer, support for 8bpp bitmap device. More... | |
| FS_RESULT | FSCRT_Renderer_SetGamma (FS_FLOAT gamma) |
| Set gamma value for text rendering. More... | |
| FS_RESULT | FSCRT_Renderer_SetClipRect (FSCRT_RENDERER renderer, const FSCRT_RECT *clipRect) |
| Set the current clipping rectangle into a renderer. More... | |
| FS_RESULT | FSCRT_Renderer_DrawBitmap (FSCRT_RENDERER renderer, FS_INT32 dstLeft, FS_INT32 dstTop, FSCRT_BITMAP srcBitmap, const FSCRT_RECT *srcRect) |
| Render a bitmap object. More... | |
Macros Definitions for renderer flags | |
| |
| #define | FSCRT_RENDERERFLAG_LCDTEXT 0x01 |
| Set if it needs text rendering optimization for LCD display. | |
| #define | FSCRT_RENDERERFLAG_BGRSTRIPE 0x02 |
| Set if device is using BGR LCD stripe. | |
| #define | FSCRT_RENDERERFLAG_USEANTIALIAS 0x04 |
| Use anti-aliasing to render graphics objects. | |
| #define | FSCRT_RENDERERFLAG_GRAYSCALE 0x08 |
| Gray scale output. | |
| #define | FSCRT_RENDERERFLAG_NONATIVETEXT 0x10 |
| Disable native text rendering feature (like GDI+, CGContext). | |
| #define | FSCRT_RENDERERFLAG_TEXTGAMMA 0x20 |
| Enable gamma to support to display small characters. | |
Macros Definitions for render blend mode | |
| #define | FSCRT_RENDERERBLEND_NORMAL 0 |
| Selecting source color and ignoring backdrop color. More... | |
| #define | FSCRT_RENDERERBLEND_MULTIPLY 1 |
| Multiply backdrop by source color values. More... | |
| #define | FSCRT_RENDERERBLEND_SCREEN 2 |
| Multiply complements of backdrop by source color values, and then complement the result. More... | |
| #define | FSCRT_RENDERERBLEND_OVERLAY 3 |
| Multiply or screens colors, depending on backdrop color value. More... | |
| #define | FSCRT_RENDERERBLEND_DARKEN 4 |
| Select darker one of backdrop and source colors. More... | |
| #define | FSCRT_RENDERERBLEND_LIGHTEN 5 |
| Select lighter one of backdrop and source colors. More... | |
| #define | FSCRT_RENDERERBLEND_COLORDODGE 6 |
| Brightens backdrop color to reflect source colors. More... | |
| #define | FSCRT_RENDERERBLEND_COLORBURN 7 |
| Darkens backdrop color to reflect the source color. More... | |
| #define | FSCRT_RENDERERBLEND_HARDLIGHT 8 |
| Multiply or screens colors, depending on source color value. More... | |
| #define | FSCRT_RENDERERBLEND_SOFTLIGHT 9 |
| Darkens or lightens colors, depending on source color value. More... | |
| #define | FSCRT_RENDERERBLEND_DIFFERENCE 10 |
| Subtracts the darker of the two constituent colors from lighter colors. More... | |
| #define | FSCRT_RENDERERBLEND_EXCLUSION 11 |
| Produces an effect similar to that of different modes but lower in contrast. More... | |
| #define | FSCRT_RENDERERBLEND_HUE 21 |
| Creates a color with the hue of the source color, and the saturation and luminosity of the backdrop color. More... | |
| #define | FSCRT_RENDERERBLEND_SATURATION 22 |
| Creates a color with the saturation of the source color, and the hue and luminosity of the backdrop color. More... | |
| #define | FSCRT_RENDERERBLEND_COLOR 23 |
| Creates a color with the hue and saturation of the source color, and the luminosity of the backdrop color. More... | |
| #define | FSCRT_RENDERERBLEND_LUMINOSITY 24 |
| Creates a color with the luminosity of the source color, and the hue and saturation of the backdrop color. More... | |
Macro Definitions for Line Cap Styles | |
| #define | FSCRT_LINECAP_BUTT 0 |
| The Butt Line Cap Type. More... | |
| #define | FSCRT_LINECAP_ROUND 1 |
| The Round Line Cap Type. More... | |
| #define | FSCRT_LINECAP_SQUARE 2 |
| The Projecting Square Line Cap Type. More... | |
Macro Definitions for Line Join Styles | |
| #define | FSCRT_LINEJOIN_MITER 0 |
| Miter line join type. More... | |
| #define | FSCRT_LINEJOIN_ROUND 1 |
| Round line join type. More... | |
| #define | FSCRT_LINEJOIN_BEVEL 2 |
| Bevel line join type. More... | |
Definitions for a rendering engine.
Definitions and functions in this module are included in fs_renderer_r.h.
Module: Renderer
License Identifier: Renderer/All
Available License Right: Unnecessary.
This module contains the following features:
| #define FSCRT_LINECAP_BUTT 0 |
The Butt Line Cap Type.
The stroke is squared off at the endpoint of a path. There is no projection beyond the end of a path.
| #define FSCRT_LINECAP_ROUND 1 |
The Round Line Cap Type.
A semicircular arc with a diameter equal to the line width is drawn around the endpoint and filled in.
| #define FSCRT_LINECAP_SQUARE 2 |
The Projecting Square Line Cap Type.
The stroke continues beyond the endpoint of the path for a distance equal to half the line width and is squared off.
| #define FSCRT_LINEJOIN_BEVEL 2 |
Bevel line join type.
The two segments are finished with butt caps and the resulting notch beyond the end of the segments is filled with a triangle.
| #define FSCRT_LINEJOIN_MITER 0 |
Miter line join type.
The outer edges of the strokes for the two segments are extended until they meet at an angle.
| #define FSCRT_LINEJOIN_ROUND 1 |
Round line join type.
An arc of a circle with a diameter equal to the line width is drawn around the point where the two segments meet, connecting the outer edges of the strokes for the two segments.
| #define FSCRT_RENDERERBLEND_COLOR 23 |
Creates a color with the hue and saturation of the source color, and the luminosity of the backdrop color.
Here is the formula :
B(Cb, Cs) = SetLum(Cs, Lum(Cb)).
| #define FSCRT_RENDERERBLEND_COLORBURN 7 |
Darkens backdrop color to reflect the source color.
Painting with white produces no changes.
Here is the formula :
B(Cb, Cs) =
| #define FSCRT_RENDERERBLEND_COLORDODGE 6 |
Brightens backdrop color to reflect source colors.
Painting with black produces no changes.
Here is the formula :
B(Cb, Cs) =
| #define FSCRT_RENDERERBLEND_DARKEN 4 |
Select darker one of backdrop and source colors.
Here is the formula :
B(Cb, Cs) = min(Cb, Cs).
| #define FSCRT_RENDERERBLEND_DIFFERENCE 10 |
Subtracts the darker of the two constituent colors from lighter colors.
Here is the formula :
B(Cb, Cs) = |Cb - Cs|.
| #define FSCRT_RENDERERBLEND_EXCLUSION 11 |
Produces an effect similar to that of different modes but lower in contrast.
Here is the formula :
B(Cb, Cs) = Cb + Cs - 2 * Cb * Cs.
| #define FSCRT_RENDERERBLEND_HARDLIGHT 8 |
Multiply or screens colors, depending on source color value.
Here is the formula :
B(Cb, Cs) =
| #define FSCRT_RENDERERBLEND_HUE 21 |
Creates a color with the hue of the source color, and the saturation and luminosity of the backdrop color.
Here is the formula :
B(Cb, Cs) = SetLum(SetSat(Cs, Sat(Cb)), Lum(Cb)).
| #define FSCRT_RENDERERBLEND_LIGHTEN 5 |
Select lighter one of backdrop and source colors.
Here is the formula :
B(Cb, Cs) = max(Cb, Cs).
| #define FSCRT_RENDERERBLEND_LUMINOSITY 24 |
Creates a color with the luminosity of the source color, and the hue and saturation of the backdrop color.
Here is the formula :
B(Cb, Cs) = SetLum(Cb, Lum(Cs)).
| #define FSCRT_RENDERERBLEND_MULTIPLY 1 |
Multiply backdrop by source color values.
Here is the formula :
B(Cb, Cs) = Cb * Cs.
| #define FSCRT_RENDERERBLEND_NORMAL 0 |
Selecting source color and ignoring backdrop color.
Here is the formula :
B(Cb, Cs) = Cs.
| #define FSCRT_RENDERERBLEND_OVERLAY 3 |
Multiply or screens colors, depending on backdrop color value.
Here is the formula :
B(Cb, Cs) = HardLight(Cs, Cb).
| #define FSCRT_RENDERERBLEND_SATURATION 22 |
Creates a color with the saturation of the source color, and the hue and luminosity of the backdrop color.
Here is the formula :
B(Cb, Cs) = SetLum(SetSat(Cb, Sat(Cs)), Lum(Cb)).
| #define FSCRT_RENDERERBLEND_SCREEN 2 |
Multiply complements of backdrop by source color values, and then complement the result.
Here is the formula :
B(Cb, Cs) = 1 - [(1 - Cb) * (1 - Cs)] = Cb + Cs - Cb * Cs.
| #define FSCRT_RENDERERBLEND_SOFTLIGHT 9 |
Darkens or lightens colors, depending on source color value.
Here is the formula :
B(Cb, Cs) =
| FS_RESULT FSCRT_Renderer_CreateOnBitmap | ( | FSCRT_BITMAP | bitmap, |
| FSCRT_RENDERER * | renderer | ||
| ) |
Create a renderer on a bitmap object.
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 a renderer: one is to draw on a renderer directly, and the other one 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.
| [in] | bitmap | Handle to a FSCRT_BITMAP object which is a bitmap object used to create a renderer. ATTENTION: FSCRT_BITMAPFORMAT_16BPP_RGB565 is only supported in Android Platform. |
| [out] | renderer | Pointer to a FSCRT_RENDERER handle that receives a new renderer. |
| FS_RESULT FSCRT_Renderer_DrawBitmap | ( | FSCRT_RENDERER | renderer, |
| FS_INT32 | dstLeft, | ||
| FS_INT32 | dstTop, | ||
| FSCRT_BITMAP | srcBitmap, | ||
| const FSCRT_RECT * | srcRect | ||
| ) |
Render a bitmap object.
| [in] | renderer | Handle to a FSCRT_RENDERER object which is a renderer object. |
| [in] | dstLeft | Left pixel position of a given area to render in the coordinate of destination. |
| [in] | dstTop | Top pixel position of a given area to render in the coordinate of destination. |
| [in] | srcBitmap | Handle to a FSCRT_BITMAP object which is a bitmap object used to render. |
| [in] | srcRect | Pointer to a FSCRT_RECT structure which specifies a rectangle of the bitmap. |
| FS_RESULT FSCRT_Renderer_Release | ( | FSCRT_RENDERER | renderer | ) |
Release a given renderer object.
| [in] | renderer | Handle to a FSCRT_RENDERER object which is a renderer object created by the function FSCRT_Renderer_CreateOnBitmap or platform-dependednt renderer creating functions. |
| FS_RESULT FSCRT_Renderer_SetClipRect | ( | FSCRT_RENDERER | renderer, |
| const FSCRT_RECT * | clipRect | ||
| ) |
Set the current clipping rectangle into a renderer.
| [in] | renderer | Handle to a FSCRT_RENDERER object which is a renderer object. |
| [in] | clipRect | Pointer to a FSCRT_RECT structure which specifies a clipping rectangle. Set it to NULL if clear the current clipping region. |
Set bitmap dither bits of a renderer, support for 8bpp bitmap device.
| [in] | renderer | Handle to a FSCRT_RENDERER object which is a renderer object. |
| [in] | bits | An integer value for number of bitmap dither bits. The valid values are 2,3,4. |
Set flags of a renderer.
| [in] | renderer | Handle to a FSCRT_RENDERER object which is a renderer object. |
| [in] | flags | An integer value for renderer flags. All undefined bits are omitted. Please refer to macro definitions FSCRT_RENDERERFLAG_XXX and this can be one or a combination of these macros. |
Set gamma value for text rendering.
| [in] | gamma | Gamma value. It should be greater than 0. The default value is 2.2. |