Graphics
HPDF_Page_SetLineWidth
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_SetLineWidth (HPDF_Page page,
HPDF_REAL line_width);
HPDF_STATUS
HPDF_Page_SetLineWidth (HPDF_Page page,
HPDF_REAL line_width);
Description
HPDF_Page_SetLineWidth() sets the width of the line used to stroke a
path.An application can invoke HPDF_Page_SetLineWidth() when the graphics mode of the page is in HPDF_GMODE_PAGE_DESCRIPTION or HPDF_GMODE_TEXT_OBJECT.
Parameter
pageThe handle of a page object.
line_widthThe width of line.
Returns
When HPDF_Page_SetLineWidth() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_SetLineCap
#include
"apdf.h"
HPDF_Page_SetLineCap (HPDF_Page page,
HPDF_LineCap line_cap);
HPDF_Page_SetLineCap (HPDF_Page page,
HPDF_LineCap line_cap);
Description
HPDF_Page_SetLineCap() sets the shape to be used at the ends of line.An application can invoke HPDF_Page_SetLineCap() when the graphics mode of the page is in HPDF_GMODE_PAGE_DESCRIPTION or HPDF_GMODE_TEXT_OBJECT.
Parameter
pageThe handle of a page object.
line_capThe style of line-cap.
value |
description |
|
HPDF_BUTT_END | The line is squared off at the
endpoint of the path. |
|
HPDF_ROUND_END | The end of a line becomes a
semicircle whose center is the end point of the path. |
|
HPDF_PROJECTING_SCUARE_END | The line continues to the point
that exceeds half of the stroke width the end point. |
Returns
When HPDF_Page_SetLineCap() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_SetLineJoin
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_SetLineJoin (HPDF_Page page,
HPDF_LineJoin line_join);
HPDF_STATUS
HPDF_Page_SetLineJoin (HPDF_Page page,
HPDF_LineJoin line_join);
Description
HPDF_Page_SetLineJoin() Sets the line join style in the page.An application can invoke HPDF_Page_SetLineJoin() when the graphics mode of the page is in HPDF_GMODE_PAGE_DESCRIPTION or HPDF_GMODE_TEXT_OBJECT.
Parameter
pageThe handle of a page object.
line_joinThe style of line-join.
value |
sample |
HPDF_MITER_JOIN | |
HPDF_ROUND_JOIN | |
HPDF_BEVEL_JOIN |
Returns
When HPDF_Page_SetLineJoin() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_SetMiterLimit
HPDF_Page_SetDash
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_SetDash (HPDF_Page page,
const HPDF_UINT16 *dash_ptn,
HPDF_UINT num_param,
HPDF_UINT phase);
HPDF_STATUS
HPDF_Page_SetDash (HPDF_Page page,
const HPDF_UINT16 *dash_ptn,
HPDF_UINT num_param,
HPDF_UINT phase);
Description
HPDF_Page_SetDash() Sets the line dash pattern in the page.An application can invoke HPDF_Page_SetDash() when the graphics mode of the page is in HPDF_GMODE_PAGE_DESCRIPTION or HPDF_GMODE_TEXT_OBJECT.
Sample of the dash pattern.
- dash_ptn=NULL, num_pattern = 0, phase=0
- dash_ptn=[3], num_pattern = 1, phase=1
- dash_ptn=[7, 3], num_pattern = 2, phase=2
- dash_ptn=[8, 7, 2, 7], num_pattern = 4, phase=0
Parameter
pageThe handle of a page object.
dash_patternAn array of HPDF_UINT16 which specify pattern of
dashes and gaps used to stroke paths.
num_paramThe number of the element of the dash_pattern.
Admitted ranges are from 0 to 8.
phaseThe phase in which the pattern begins.
Returns
When HPDF_Page_SetDash() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_
HPDF_Page_SetExtGState
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_SetExtGState (HPDF_Page page,
HPDF_ExtGState ext_gstate);
HPDF_STATUS
HPDF_Page_SetExtGState (HPDF_Page page,
HPDF_ExtGState ext_gstate);
Description
HPDF_Page_SetExtGState() applys the graphics state to the page.An application can invoke HPDF_Page_GSave() when the graphics mode of the page is in HPDF_GMODE_PAGE_DESCRIPTION.
Parameter
pageThe handle of a page object.
ext_gstateThe handle of a extended graphics state object.
Returns
When HPDF_Page_SetExtGState() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_GSave
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_GSave (HPDF_Page page);
HPDF_STATUS
HPDF_Page_GSave (HPDF_Page page);
Description
HPDF_Page_GSave() saves the page's current graphics parameter to the
stack. An application can invoke HPDF_Page_GSave() up to 28 and can
restore the saved parameter by invoking HPDF_Page_GRestore().The parameters that are saved by HPDF_Page_GSave() is as follows.
- Transformation Matrix
- Line Width
- Line Cap Style
- Line Join Style
- Miter Limit
- Dash Mode
- Flatness
- Character Spacing
- Word Spacing
- Horizontal Scalling
- Text Leading
- Rendering Mode
- Text Rise
- Filling Color
- Stroking Color
- Font
- Font Size
Parameter
pageThe handle of a page object.
Returns
When HPDF_Page_GSave() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_GRestore
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_GRestore (HPDF_Page page);
HPDF_STATUS
HPDF_Page_GRestore (HPDF_Page page);
Description
HPDF_Page_GRestore() restore the graphics state which is saved by
HPDF_Page_GSave().An application can invoke HPDF_Page_GSave() when the graphics mode of the page is in HPDF_GMODE_PAGE_DESCRIPTION.
Parameter
pageThe handle of a page object.
Returns
When HPDF_Page_GRestore() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_Concat
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_Concat (HPDF_Page page,
HPDF_REAL a,
HPDF_REAL b,
HPDF_REAL c,
HPDF_REAL d,
HPDF_REAL x,
HPDF_REAL y);
HPDF_STATUS
HPDF_Page_Concat (HPDF_Page page,
HPDF_REAL a,
HPDF_REAL b,
HPDF_REAL c,
HPDF_REAL d,
HPDF_REAL x,
HPDF_REAL y);
Description
HPDF_Page_Concat() concatenates the page's current transformation
matrix and specified matrix.For example, if you want to rotate the coordinate system of the page by 45 degrees, use HPDF_Page_Concat() as follows.
float rad1 = 45 / 180 * 3.141592;
HPDF_Page_Concat (page, cos(rad1), sin(rad1), -sin(rad1),
cos(rad1), 220, 350);
HPDF_Page_Concat (page, cos(rad1), sin(rad1), -sin(rad1),
cos(rad1), 220, 350);
Additionally to change the coordinate system of the page to 300dpi, use HPDF_Page_Concat() as follows.
HPDF_Page_Concat (page, 72.0f / 300.0f, 0,
0, 72.0f / 300.0f, 0, 0);
Invoke HPDF_Page_GSave() before HPDF_Page_Concat(). Then the change by HPDF_Page_Concat() can be restored by invoking HPDF_Page_GRestore().
/* save the current graphics states */
HPDF_Page_GSave (page);
/* concatenate the transformation matrix */
HPDF_Page_Concat (page, 72.0f / 300.0f, 0, 0, 72.0f / 300.0f, 0, 0);
/* show text on the translated coordinates */
HPDF_Page_BeginText (page);
HPDF_Page_MoveTextPos (page, 50, 100);
HPDF_Page_ShoeText (page, "Text on the translated coordinates");
HPDF_Page_EndText (page);
/* restore the graphics states */
HPDF_Page_GRestore (page);
HPDF_Page_GSave (page);
/* concatenate the transformation matrix */
HPDF_Page_Concat (page, 72.0f / 300.0f, 0, 0, 72.0f / 300.0f, 0, 0);
/* show text on the translated coordinates */
HPDF_Page_BeginText (page);
HPDF_Page_MoveTextPos (page, 50, 100);
HPDF_Page_ShoeText (page, "Text on the translated coordinates");
HPDF_Page_EndText (page);
/* restore the graphics states */
HPDF_Page_GRestore (page);
An application can invoke HPDF_Page_GSave() when the graphics mode of the page is in HPDF_GMODE_PAGE_DESCRIPTION.
Parameter
pageThe handle of a page object.
a, b, c, d, x, yThe transformation matrix to concatenate.
Returns
When HPDF_Page_Concat() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_MoveTo
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_MoveTo (HPDF_Page page,
HPDF_REAL x,
HPDF_REAL y);
HPDF_STATUS
HPDF_Page_MoveTo (HPDF_Page page,
HPDF_REAL x,
HPDF_REAL y);
Description
HPDF_Page_MoveTo() starts a new subpath and move the current point for
drawing path,
HPDF_Page_MoveTo() sets the start point for the path to the point (x,
y) and changes the graphics mode to
HPDF_GMODE_PATH_OBJECT.An application can invoke HPDF_Page_MoveTo() when the graphics mode of the page is in HPDF_GMODE_PAGE_DESCRIPTION or HPDF_GMODE_PATH_OBJECT.
Parameter
pageThe handle of a page object.
x, yThe start point for drawing path
Returns
When HPDF_Page_MoveTo() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_LineTo
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_LineTo (HPDF_Page page,
HPDF_REAL x,
HPDF_REAL y);
HPDF_STATUS
HPDF_Page_LineTo (HPDF_Page page,
HPDF_REAL x,
HPDF_REAL y);
Description
HPDF_Page_LineTo() appends a path from the current point to the
specified
point.An application can invoke HPDF_Page_LineTo() when the graphics mode of the page is in HPDF_GMODE_PATH_OBJECT.
Parameter
pageThe handle of a page object.
x, yThe end point of the path
Returns
When HPDF_Page_LineTo() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_CurveTo
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_CurveTo (HPDF_Page page,
HPDF_REAL x1,
HPDF_REAL y1,
HPDF_REAL x2,
HPDF_REAL y2,
HPDF_REAL x3,
HPDF_REAL y3);
HPDF_STATUS
HPDF_Page_CurveTo (HPDF_Page page,
HPDF_REAL x1,
HPDF_REAL y1,
HPDF_REAL x2,
HPDF_REAL y2,
HPDF_REAL x3,
HPDF_REAL y3);
Description
HPDF_Page_CurveTo() appends a Bézier curve to the current path
using two spesified points.The point (x1, y1) and the point (x2, y2) are used as the control points for a Bézier curve and current point is moved to the point (x3, y3)
An application can invoke HPDF_Page_CurveTo() when the graphics mode of the page is in HPDF_GMODE_PATH_OBJECT.
Parameter
pageThe handle of a page object.
x1, y1, x2, y2, x3, y3The control points for a Bézier curve.
Returns
When HPDF_Page_CurveTo() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_CurveTo2
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_CurveTo2 (HPDF_Page page,
HPDF_REAL x2,
HPDF_REAL y2,
HPDF_REAL x3,
HPDF_REAL y3);
HPDF_STATUS
HPDF_Page_CurveTo2 (HPDF_Page page,
HPDF_REAL x2,
HPDF_REAL y2,
HPDF_REAL x3,
HPDF_REAL y3);
Description
HPDF_Page_CurveTo2() appends a Bézier curve to the current path
using two spesified points.The current point and the point (x2, y2) are used as the control points for a Bézier curve and current point is moved to the point (x3, y3)
An application can invoke HPDF_Page_CurveTo3() when the graphics mode of the page is in HPDF_GMODE_PATH_OBJECT.
Parameter
pageThe handle of a page object.
x2, y2, x3, y3The control points for a Bézier curve.
Returns
When HPDF_Page_CurveTo3() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_CurveTo3
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_CurveTo3 (HPDF_Page page,
HPDF_REAL x1,
HPDF_REAL y1,
HPDF_REAL x3,
HPDF_REAL y3);
HPDF_STATUS
HPDF_Page_CurveTo3 (HPDF_Page page,
HPDF_REAL x1,
HPDF_REAL y1,
HPDF_REAL x3,
HPDF_REAL y3);
Description
HPDF_Page_CurveTo3() appends a Bézier curve to the current path
using two spesified points.The point (x1, y1) and the point (x3, y3) are used as the control points for a Bézier curve and current point is moved to the point (x3, y3)
An application can invoke HPDF_Page_CurveTo2() when the graphics mode of the page is in HPDF_GMODE_PATH_OBJECT.
Parameter
pageThe handle of a page object.
x1, y1, x3, y3The control points for a Bézier curve.
Returns
When HPDF_Page_CurveTo3() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_ClosePath
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_ClosePath (HPDF_Page page);
HPDF_STATUS
HPDF_Page_ClosePath (HPDF_Page page);
Description
HPDF_Page_ClosePath() appends a strait line from the current point to
the start point of sub path.The current point is moved to the start point of sub path.
An application can invoke HPDF_Page_CurveTo2() when the graphics mode of the page is in HPDF_GMODE_PATH_OBJECT.
Parameter
pageThe handle of a page object.
Returns
When HPDF_Page_ClosePath() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_Rectangle
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_Rectangle (HPDF_Page page,
HPDF_REAL x,
HPDF_REAL y,
HPDF_REAL width,
HPDF_REAL height);
HPDF_STATUS
HPDF_Page_Rectangle (HPDF_Page page,
HPDF_REAL x,
HPDF_REAL y,
HPDF_REAL width,
HPDF_REAL height);
Description
HPDF_Page_Rectangle() appends a rectangle to the current path.An application can invoke HPDF_Page_Rectangle() when the graphics mode of the page is in HPDF_GMODE_PAGE_DESCRIPTION or HPDF_GMODE_PATH_OBJECT.
Parameter
pageThe handle of a page object.
x, yThe lower-left point of the rectangle.
widthThe width of the rectangle.
heightThe height of the rectangle.
Returns
When HPDF_Page_Rectangle() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_Stroke
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_Stroke (HPDF_Page page);
HPDF_STATUS
HPDF_Page_Stroke (HPDF_Page page);
Description
HPDF_Page_Stroke() paints the current path.An application can invoke HPDF_Page_Stroke() when the graphics mode of the page is in HPDF_GMODE_PATH_OBJECT. And it changes the graphics mode to HPDF_GMODE_PAGE_DESCRIPTION.
Parameter
pageThe handle of a page object.
Returns
When HPDF_Page_Stroke() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_ClosePathStroke
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_ClosePathStroke (HPDF_Page page);
HPDF_STATUS
HPDF_Page_ClosePathStroke (HPDF_Page page);
Description
HPDF_Page_ClosePathStroke() closes the current path, then it paints the
path.An application can invoke HPDF_Page_ClosePathStroke() when the graphics mode of the page is in HPDF_GMODE_PATH_OBJECT. And it changes the graphics mode to HPDF_GMODE_PAGE_DESCRIPTION.
Parameter
pageThe handle of a page object.
Returns
When HPDF_Page_ClosePathStroke() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_Fill
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_Fill(HPDF_Page page);
HPDF_STATUS
HPDF_Page_Fill(HPDF_Page page);
Description
HPDF_Page_Fill() fills the current path using the nonzero winding
number rule.An application can invoke HPDF_Page_Fill() when the graphics mode of the page is in HPDF_GMODE_PATH_OBJECT. And it changes the graphics mode to HPDF_GMODE_PAGE_DESCRIPTION.
Parameter
pageThe handle of a page object.
Returns
When HPDF_Page_Fill() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_Eofill
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_Eofill(HPDF_Page page);
HPDF_STATUS
HPDF_Page_Eofill(HPDF_Page page);
Description
HPDF_Page_Eofill() fills the current path using the even-odd rule.An application can invoke HPDF_Page_Eofill() when the graphics mode of the page is in HPDF_GMODE_PATH_OBJECT. And it changes the graphics mode to HPDF_GMODE_PAGE_DESCRIPTION.
Parameter
pageThe handle of a page object.
Returns
When HPDF_Page_Eofill() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_FillStroke
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_FillStroke(HPDF_Page page);
HPDF_STATUS
HPDF_Page_FillStroke(HPDF_Page page);
Description
HPDF_Page_FillStroke() fills the current path using the nonzero winding
number rule, then it paints the
path. An application can invoke HPDF_Page_FillStroke() when the graphics mode of the page is in HPDF_GMODE_PATH_OBJECT. And it changes the graphics mode to HPDF_GMODE_PAGE_DESCRIPTION.
Parameter
pageThe handle of a page object.
Returns
When HPDF_Page_FillStroke() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_EofillStroke
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_EofillStroke(HPDF_Page page);
HPDF_STATUS
HPDF_Page_EofillStroke(HPDF_Page page);
Description
HPDF_Page_EofillStroke() fills the current path using the even-odd
rule, then it paints the
path. An application can invoke HPDF_Page_EofillStroke() when the graphics mode of the page is in HPDF_GMODE_PATH_OBJECT. And it changes the graphics mode to HPDF_GMODE_PAGE_DESCRIPTION.
Parameter
pageThe handle of a page object.
Returns
When HPDF_Page_EofillStroke() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_ClosePathFillStroke
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_ClosePathFillStroke(HPDF_Page page);
HPDF_STATUS
HPDF_Page_ClosePathFillStroke(HPDF_Page page);
Description
HPDF_Page_ClosePathFillStroke() closes the current path, fills the
current path using the nonzero winding
number rule, then it paints the
path. An application can invoke HPDF_Page_ClosePathFillStroke() when the graphics mode of the page is in HPDF_GMODE_PATH_OBJECT. And it changes the graphics mode to HPDF_GMODE_PAGE_DESCRIPTION.
Parameter
pageThe handle of a page object.
Returns
When HPDF_Page_ClosePathFillStroke() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_ClosePathEofillStroke
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_ClosePathEoillStroke(HPDF_Page page);
HPDF_STATUS
HPDF_Page_ClosePathEoillStroke(HPDF_Page page);
Description
HPDF_Page_ClosePathEofillStroke() closes the current path, fills the
current path using the even-odd rule, then it paints the
path. An application can invoke HPDF_Page_ClosePathEofillStroke() when the graphics mode of the page is in HPDF_GMODE_PATH_OBJECT. And it changes the graphics mode to HPDF_GMODE_PAGE_DESCRIPTION.
Parameter
pageThe handle of a page object.
Returns
When HPDF_Page_ClosePathEofillStroke() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_EndPath
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_EndPath(HPDF_Page page);
HPDF_STATUS
HPDF_Page_EndPath(HPDF_Page page);
Description
HPDF_Page_EndPath() ends the path object without filling and painting
operation.An application can invoke HPDF_Page_EndPath() when the graphics mode of the page is in HPDF_GMODE_PATH_OBJECT. And it changes the graphics mode to HPDF_GMODE_PAGE_DESCRIPTION.
Parameter
pageThe handle of a page object.
Returns
When HPDF_Page_EndPath() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_Clip
HPDF_Page_Eoclip
HPDF_Page_BeginText
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_BeginText(HPDF_Page page);
HPDF_STATUS
HPDF_Page_BeginText(HPDF_Page page);
Description
HPDF_Page_BeginText() begins a text object and sets the current text
position to the point (0, 0).An application can invoke HPDF_Page_BeginText() when the graphics mode of the page is in HPDF_GMODE_PAGE_DESCRIPTION. And it changes the graphics mode to HPDF_GMODE_TEXT_OBJECT.
Parameter
pageThe handle of a page object.
Returns
When HPDF_Page_BeginText() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_EndText
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_EndText(HPDF_Page page);
HPDF_STATUS
HPDF_Page_EndText(HPDF_Page page);
Description
HPDF_Page_EndText() ends a text object.An application can invoke HPDF_Page_EndText() when the graphics mode of the page is in HPDF_GMODE_TEXT_OBJECT. And it changes the graphics mode to HPDF_GMODE_PAGE_DESCRIPTION.
Parameter
pageThe handle of a page object.
Returns
When HPDF_Page_EndText() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_SetCharSpace
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_SetCharSpace (HPDF_Page page,
HPDF_REAL value);
HPDF_STATUS
HPDF_Page_SetCharSpace (HPDF_Page page,
HPDF_REAL value);
Description
HPDF_Page_SetCharSpace() sets the character spacing for text showing.The initial value of character spacing is 0.
An application can invoke HPDF_Page_SetCharSpace() when the graphics mode of the page is in HPDF_GMODE_PAGE_DESCRIPTION or HPDF_GMODE_TEXT_OBJECT.
Parameter
pageThe handle of a page object.
valueThe value of character spacing.
Returns
When HPDF_Page_SetCharSpace() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_SetWordSpace
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_SetWordSpace (HPDF_Page page,
HPDF_REAL value);
HPDF_STATUS
HPDF_Page_SetWordSpace (HPDF_Page page,
HPDF_REAL value);
Description
HPDF_Page_SetWordSpace() sets the word spacing for text showing.The initial value of word spacing is 0.
An application can invoke HPDF_Page_SetWordSpace() when the graphics mode of the page is in HPDF_GMODE_PAGE_DESCRIPTION or HPDF_GMODE_TEXT_OBJECT.
Parameter
pageThe handle of a page object.
valueThe value of word spacing.
Returns
When HPDF_Page_SetWordSpace() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_SetHorizontalScalling
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_SetHorizontalScalling (HPDF_Page page,
HPDF_REAL value);
HPDF_STATUS
HPDF_Page_SetHorizontalScalling (HPDF_Page page,
HPDF_REAL value);
Description
HPDF_Page_SetHorizontalScalling() sets the horizontal scalling for text
showing.The initial value of horizontal scalling is 100.
An application can invoke HPDF_Page_SetHorizontalScalling() when the graphics mode of the page is in HPDF_GMODE_PAGE_DESCRIPTION or HPDF_GMODE_TEXT_OBJECT.
Parameter
pageThe handle of a page object.
value
The value of horizontal scalling.
Returns
When HPDF_Page_SetHorizontalScalling() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_SetTextLeading
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_SetTextLeading (HPDF_Page page,
HPDF_REAL value);
HPDF_STATUS
HPDF_Page_SetTextLeading (HPDF_Page page,
HPDF_REAL value);
Description
HPDF_Page_SetTextLeading() sets the text leading (line spacing) for
text showing.The initial value of leading is 0.
An application can invoke HPDF_Page_SetTextLeading() when the graphics mode of the page is in HPDF_GMODE_PAGE_DESCRIPTION or HPDF_GMODE_TEXT_OBJECT.
Parameter
pageThe handle of a page object.
value
The value of text leading.
Returns
When HPDF_Page_SetTextLeading() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_SetFontAndSize
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_SetFontAndSize (HPDF_Page page,
HPDF_Font font,
HPDF_REAL size);
HPDF_STATUS
HPDF_Page_SetFontAndSize (HPDF_Page page,
HPDF_Font font,
HPDF_REAL size);
Description
HPDF_Page_SetFontAndSize() sets the type of font and size leading.An application can invoke HPDF_Page_SetFontAndSize() when the graphics mode of the page is in HPDF_GMODE_PAGE_DESCRIPTION or HPDF_GMODE_TEXT_OBJECT.
Parameter
pageThe handle of a page object.
font
The handle of a font object.
sizeThe size of a font.
Returns
When HPDF_Page_SetFontAndSize() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_SetTextRenderingMode
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_SetTextRenderingMode (HPDF_Page page,
HPDF_TextRenderingMode mode);
HPDF_STATUS
HPDF_Page_SetTextRenderingMode (HPDF_Page page,
HPDF_TextRenderingMode mode);
Description
HPDF_Page_SetTextRenderingMode() sets the text rendering mode.The initial value of text rendering mode is HPDF_FILL.
An application can invoke HPDF_Page_SetTextRenderingMode() when the graphics mode of the page is in HPDF_GMODE_PAGE_DESCRIPTION or HPDF_GMODE_TEXT_OBJECT.
Parameter
pageThe handle of a page object.
mode
The text rendering mode (one of the following
values)
VALUE |
SAMPLE |
HPDF_FILL |
|
HPDF_STROKE |
|
HPDF_FILL_THEN_STROKE |
|
HPDF_INVISIBLE |
|
HPDF_FILL_CLIPPING |
|
HPDF_STROKE_CLIPPING |
|
HPDF_FILL_STROKE_CLIPPING |
|
HPDF_CLIPPING |
Returns
When HPDF_Page_SetTextRenderingMode() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_SetTextRise
HPDF_Page_MoveTextPos
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_MoveTextPos (HPDF_Page page,
HPDF_REAL x,
HPDF_REAL y);
HPDF_STATUS
HPDF_Page_MoveTextPos (HPDF_Page page,
HPDF_REAL x,
HPDF_REAL y);
Description
HPDF_Page_MoveTextPos() moves the current text position to the start of
the next line with using specified offset values. If the start position
of the current line is (x1, y1), the start of the next line is (x1 + x,
y1 + y). An application can invoke HPDF_MoveTextPos() when the graphics mode of the page is in HPDF_GMODE_TEXT_OBJECT.
Parameter
pageThe handle of a page object.
xpos, yposThe offset of the start of the next line.
textThe text to show.
Returns
When HPDF_Page_MoveTextPos() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_MoveTextPos2
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_MoveTextPos2 (HPDF_Page page,
HPDF_REAL x,
HPDF_REAL y);
HPDF_STATUS
HPDF_Page_MoveTextPos2 (HPDF_Page page,
HPDF_REAL x,
HPDF_REAL y);
Description
HPDF_Page_MoveTextPos2() moves the current text position to the start
of the next line with using specified offset values, and sets the
text-leading to -y. If the
start position of the current line is (x1, y1), the start of the next
line is (x1 + x, y1 + y). An application can invoke HPDF_MoveTextPos2() when the graphics mode of the page is in HPDF_GMODE_TEXT_OBJECT.
Parameter
pageThe handle of a page object.
xpos, yposThe offset of the start of the next line.
textThe text to show.
Returns
When HPDF_Page_MoveTextPos2() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_SetTextMatrix
HPDF_Page_MoveToNextLine
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_MoveToNextLine (HPDF_Page page);
HPDF_STATUS
HPDF_Page_MoveToNextLine (HPDF_Page page);
Description
HPDF_Page_MoveTextPos2() moves the current text position to the
start of the next line. If the
start position of the current line is (x1, y1), the start of the next
line is (x1, y1 - text leading).An application can invoke HPDF_MoveTextPos2() when the graphics mode of the page is in HPDF_GMODE_TEXT_OBJECT.
NOTE:
Since the default value of Text Leading is 0, an application have to invoke HPDF_Page_SetTextLeading() before HPDF_Page_MoveTextPos2() to set text leading.
Since the default value of Text Leading is 0, an application have to invoke HPDF_Page_SetTextLeading() before HPDF_Page_MoveTextPos2() to set text leading.
Parameter
pageThe handle of a page object.
xpos, yposThe offset of the start of the next line.
textThe text to show.
Returns
When HPDF_Page_MoveTextPos2() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_ShowText
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_ShowText (HPDF_Page page,
const char *text)
HPDF_STATUS
HPDF_Page_ShowText (HPDF_Page page,
const char *text)
Description
HPDF_Page_ShowText() prints the text at the current position on the
page.An application can invoke HPDF_Page_ShowText() when the graphics mode of the page is in HPDF_GMODE_PAGE_DESCRIPTION or HPDF_GMODE_TEXT_OBJECT.
Parameter
pageThe handle of a page object.
textThe text to print.
Returns
When HPDF_Page_ShowText() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_ShowTextNextLine
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_ShowTextNextLine (HPDF_Page page,
const char *text)
HPDF_STATUS
HPDF_Page_ShowTextNextLine (HPDF_Page page,
const char *text)
Description
HPDF_Page_ShowTextNextLine() moves the current text position to the
start of the next line, then prints the text at the current position on
the page.An application can invoke HPDF_Page_ShowTextNextLine() when the graphics mode of the page is in HPDF_GMODE_PAGE_DESCRIPTION or HPDF_GMODE_TEXT_OBJECT.
Parameter
pageThe handle of a page object.
textThe text to print.
Returns
When HPDF_Page_ShowTextNextLine() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_ShowTextNextLineEx
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_ShowTextNextLineEx (HPDF_Page page,
HPDF_REAL word_space,
HPDF_REAL char_space,
const char *text)
HPDF_STATUS
HPDF_Page_ShowTextNextLineEx (HPDF_Page page,
HPDF_REAL word_space,
HPDF_REAL char_space,
const char *text)
Description
HPDF_Page_ShowTextNextLineEx() moves the current text position to
the start of the next line, then sets the word spacing, character
spacing and prints the text at the current
position on the page.An application can invoke HPDF_Page_ShowTextNextLine() when the graphics mode of the page is in HPDF_GMODE_PAGE_DESCRIPTION or HPDF_GMODE_TEXT_OBJECT.
Parameter
pageThe handle of a page object.
textThe text to print.
Returns
When HPDF_Page_ShowTextNextLine() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_SetGrayFill
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_SetGrayFill (HPDF_Page page,
HPDF_REAL gray);
HPDF_STATUS
HPDF_Page_SetGrayFill (HPDF_Page page,
HPDF_REAL gray);
Description
HPDF_Page_SetGrayFill() sets the filling color.An application can invoke HPDF_Page_SetGrayFill() when the graphics mode of the page is in HPDF_GMODE_PAGE_DESCRIPTION or HPDF_GMODE_TEXT_OBJECT.
Parameter
pageThe handle of a page object.
valueThe value of the gray level between 0 and 1.
Returns
When HPDF_Page_SetGrayFill() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_SetGrayStroke
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_SetGrayStroke (HPDF_Page page,
HPDF_REAL gray);
HPDF_STATUS
HPDF_Page_SetGrayStroke (HPDF_Page page,
HPDF_REAL gray);
Description
HPDF_Page_SetGrayStroke() sets the stroking color.An application can invoke HPDF_Page_SetGrayStroke() when the graphics mode of the page is in HPDF_GMODE_PAGE_DESCRIPTION or HPDF_GMODE_TEXT_OBJECT.
Parameter
pageThe handle of a page object.
valueThe value of the gray level between 0 and 1.
Returns
When HPDF_Page_SetGrayStroke() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_SetRGBFill
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_SetRGBFill (HPDF_Page page,
HPDF_REAL r,
HPDF_REAL g,
HPDF_REAL b)
HPDF_STATUS
HPDF_Page_SetRGBFill (HPDF_Page page,
HPDF_REAL r,
HPDF_REAL g,
HPDF_REAL b)
Description
HPDF_Page_SetRGBFill() sets the filling color.An application can invoke HPDF_Page_SetRGBFill() when the graphics mode of the page is in HPDF_GMODE_PAGE_DESCRIPTION or HPDF_GMODE_TEXT_OBJECT.
Parameter
pageThe handle of a page object.
r, g, bThe level of each color element. They must be
between 0 and 1. (See "Colors")
Returns
When HPDF_Page_SetRGBFill() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_SetRGBStroke
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_SetRGBStroke (HPDF_Page page,
HPDF_REAL r,
HPDF_REAL g,
HPDF_REAL b)
HPDF_STATUS
HPDF_Page_SetRGBStroke (HPDF_Page page,
HPDF_REAL r,
HPDF_REAL g,
HPDF_REAL b)
Description
HPDF_Page_SetRGBStroke() sets the stroking color.An application can invoke HPDF_Page_SetRGBStroke() when the graphics mode of the page is in HPDF_GMODE_PAGE_DESCRIPTION or HPDF_GMODE_TEXT_OBJECT.
Parameter
pageThe handle of a page object.
r, g, bThe level of each color element. They must be
between 0 and 1. (See "Colors")
Returns
When HPDF_Page_SetRGBStroke() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_SetCMYKFill
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_SetCMYKFill (HPDF_Page page,
HPDF_REAL c,
HPDF_REAL m,
HPDF_REAL y,
HPDF_REAL k)
HPDF_STATUS
HPDF_Page_SetCMYKFill (HPDF_Page page,
HPDF_REAL c,
HPDF_REAL m,
HPDF_REAL y,
HPDF_REAL k)
Description
HPDF_Page_SetCMYKFill() sets the filling color.An application can invoke HPDF_Page_SetCMYKFill() when the graphics mode of the page is in HPDF_GMODE_PAGE_DESCRIPTION or HPDF_GMODE_TEXT_OBJECT.
Parameter
pageThe handle of a page object.
c, m, y, kThe level of each color element. They must be
between 0 and 1.
Returns
When HPDF_Page_SetCMYKFill() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_SetCMYKStroke
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_SetCMYKStroke (HPDF_Page page,
HPDF_REAL c,
HPDF_REAL m,
HPDF_REAL y,
HPDF_REAL k)
HPDF_STATUS
HPDF_Page_SetCMYKStroke (HPDF_Page page,
HPDF_REAL c,
HPDF_REAL m,
HPDF_REAL y,
HPDF_REAL k)
Description
HPDF_Page_SetCMYKStroke() sets the stroking color.An application can invoke HPDF_Page_SetCMYKStroke() when the graphics mode of the page is in HPDF_GMODE_PAGE_DESCRIPTION or HPDF_GMODE_TEXT_OBJECT.
Parameter
pageThe handle of a page object.
c, m, y, kThe level of each color element. They must be
between 0 and 1.
Returns
When HPDF_Page_SetCMYKStroke() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_ExecuteXObject
HPDF_Page_DrawImage
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_DrawImage (HPDF_Page page,
HPDF_Image image,
HPDF_REAL x,
HPDF_REAL y,
HPDF_REAL width,
HPDF_REAL height)
HPDF_STATUS
HPDF_Page_DrawImage (HPDF_Page page,
HPDF_Image image,
HPDF_REAL x,
HPDF_REAL y,
HPDF_REAL width,
HPDF_REAL height)
Description
HPDF_Page_DrawImage() shows an image in one operation.An application can invoke HPDF_Page_DrawImage() when the graphics mode of the page is in HPDF_GMODE_PAGE_DESCRIPTION.
Parameter
pageThe handle of a page object.
image
The handle of an image object.
x, y
The lower-left point of the region where image
is displayed.
width
The width of the region where image is displayed.
height
The width of the region where image is
displayed.
Returns
When HPDF_Page_DrawImage() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_Circle
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_Circle (HPDF_Page page,
HPDF_REAL x,
HPDF_REAL y,
HPDF_REAL ray);
HPDF_STATUS
HPDF_Page_Circle (HPDF_Page page,
HPDF_REAL x,
HPDF_REAL y,
HPDF_REAL ray);
Description
HPDF_Page_Circle() appends a circle to the current path.An application can invoke HPDF_Page_Circle() when the graphics mode of the page is in HPDF_GMODE_PAGE_DESCRIPTION or HPDF_GMODE_PATH_OBJECT.
Parameter
pageThe handle of a page object.
x, yThe center point of the circle.
rayThe ray of the circle.
Returns
When HPDF_Page_Circle() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_Arc
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_Arc (HPDF_Page page,
HPDF_REAL x,
HPDF_REAL y,
HPDF_REAL ray,
HPDF_REAL ang1,
HPDF_REAL ang2);
HPDF_STATUS
HPDF_Page_Arc (HPDF_Page page,
HPDF_REAL x,
HPDF_REAL y,
HPDF_REAL ray,
HPDF_REAL ang1,
HPDF_REAL ang2);
Description
HPDF_Page_Arc() appends a circle to the current path.An application can invoke HPDF_PageArc() when the graphics mode of the page is in HPDF_GMODE_PAGE_DESCRIPTION or HPDF_GMODE_PATH_OBJECT.
Parameter
pageThe handle of a page object.
x, yThe center point of the circle.
rayThe ray of the circle.
ang1The angle of the begining of the arc.
ang2The angle of the end of the arc. It must be
greater than ang1.
Returns
When HPDF_Page_Arc() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_TextOut
#include
"apdf.h"
HPDF_STATUS
HPDF_Page_TextOut (HPDF_Page page,
HPDF_REAL xpos,
HPDF_REAL ypos,
const char *text);
HPDF_STATUS
HPDF_Page_TextOut (HPDF_Page page,
HPDF_REAL xpos,
HPDF_REAL ypos,
const char *text);
Description
HPDF_Page_TextOut() prints the text on the specified position.An application can invoke HPDF_TextOut() when the graphics mode of the page is in HPDF_GMODE_TEXT_OBJECT.
Parameter
pageThe handle of a page object.
xpos, yposThe point position where the text is displayed.
textThe text to show.
Returns
When HPDF_Page_TextOut() succeed, it returns HPDF_OK, Otherwise it returns error code and error-handler is invoked.HPDF_Page_TextRect
#include
"apdf.h"
HPDF_Page_TextRect (HPDF_Page page,
HPDF_REAL left,
HPDF_REAL top,
HPDF_REAL right,
HPDF_REAL bottom,
const char *text,
HPDF_TextAlignment align,
HPDF_UINT *len);
HPDF_Page_TextRect (HPDF_Page page,
HPDF_REAL left,
HPDF_REAL top,
HPDF_REAL right,
HPDF_REAL bottom,
const char *text,
HPDF_TextAlignment align,
HPDF_UINT *len);
Description
HPDF_Page_TextRext() TextRext() print the text inside the specified
region. The characters which is not An application can invoke HPDF_TextRect() when the graphics mode of the page is in HPDF_GMODE_TEXT_OBJECT.
Parameter
pageThe handle of a page object.
left, top, right, bottomCoordinates of corners of the region to output
text.
textThe text to show.
alignThe alignment of the text.
lenVALUE |
DESCRIPTION |
HPDF_TALIGN_LEFT |
The text is aligned to left. |
HPDF_TALIGN_RIGHT |
The text is aligned to right. |
HPDF_TALIGN_CENTER |
The text is aligned to center. |
HPDF_TALIGN_JUSTIFY |
Add spaces between the words to
justify both left and right side. |
If this value is not NULL, The number of
characters which was printed in the area is returned.