Haru Free PDF Library
|
Functions | |
HPDF_STATUS | HPDF_Page_SetLineWidth (HPDF_Page page, HPDF_REAL line_width) |
Set width of the line used to stroke paths. More... | |
HPDF_STATUS | HPDF_Page_SetLineCap (HPDF_Page page, HPDF_LineCap line_cap) |
Set lines endpoints shape style. More... | |
HPDF_STATUS | HPDF_Page_SetLineJoin (HPDF_Page page, HPDF_LineJoin line_join) |
Set line join shape style. More... | |
HPDF_STATUS | HPDF_Page_SetMiterLimit (HPDF_Page page, HPDF_REAL miter_limit) |
Set miter limit for line joins. More... | |
HPDF_STATUS | HPDF_Page_SetDash (HPDF_Page page, const HPDF_REAL *dash_pattern, HPDF_UINT num_elem, HPDF_REAL phase) |
Set dash pattern for lines in the page. More... | |
HPDF_STATUS | HPDF_Page_SetExtGState (HPDF_Page page, HPDF_ExtGState ext_gstate) |
Apply graphics state to page. More... | |
HPDF_STATUS | HPDF_Page_GSave (HPDF_Page page) |
Save the page's current graphics state to the stack. More... | |
HPDF_STATUS | HPDF_Page_GRestore (HPDF_Page page) |
Restore graphics state which is saved by HPDF_Page_GSave(). More... | |
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) |
Concatenate the page's transformation matrix and specified matrix. More... | |
HPDF_STATUS | HPDF_Page_Translate (HPDF_Page page, HPDF_REAL dx, HPDF_REAL dy) |
Concatenate the page's transformation matrix with translation matrix. More... | |
HPDF_STATUS | HPDF_Page_Scale (HPDF_Page page, HPDF_REAL sx, HPDF_REAL sy) |
Concatenate the page's transformation matrix with scale matrix. More... | |
HPDF_STATUS | HPDF_Page_RotateDeg (HPDF_Page page, HPDF_REAL degrees) |
Concatenate the page's transformation matrix with rotate matrix. More... | |
HPDF_STATUS | HPDF_Page_Rotate (HPDF_Page page, HPDF_REAL a) |
Concatenate the page's transformation matrix with rotate matrix. More... | |
HPDF_STATUS | HPDF_Page_Skew (HPDF_Page page, HPDF_REAL a, HPDF_REAL b) |
Concatenate the page's transformation matrix with skew matrix. More... | |
HPDF_STATUS | HPDF_Page_MoveTo (HPDF_Page page, HPDF_REAL x, HPDF_REAL y) |
Start new subpath and move current point for drawing path. More... | |
HPDF_STATUS | HPDF_Page_LineTo (HPDF_Page page, HPDF_REAL x, HPDF_REAL y) |
Append path from current point to specified point. More... | |
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) |
Append Bézier curve to current path using control points (x1, y1) and (x2, y2) and (x3, y3), then set current point to (x3, y3). More... | |
HPDF_STATUS | HPDF_Page_CurveTo2 (HPDF_Page page, HPDF_REAL x2, HPDF_REAL y2, HPDF_REAL x3, HPDF_REAL y3) |
Append Bézier curve to current path using current point and (x2, y2) and (x3, y3) as control points. Then current point is set to (x3, y3). More... | |
HPDF_STATUS | HPDF_Page_CurveTo3 (HPDF_Page page, HPDF_REAL x1, HPDF_REAL y1, HPDF_REAL x3, HPDF_REAL y3) |
Append 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). More... | |
HPDF_STATUS | HPDF_Page_ClosePath (HPDF_Page page) |
Append straight line from current point to the start point of subpath. More... | |
HPDF_STATUS | HPDF_Page_Rectangle (HPDF_Page page, HPDF_REAL x, HPDF_REAL y, HPDF_REAL width, HPDF_REAL height) |
Append rectangle to the current path. More... | |
HPDF_STATUS | HPDF_Page_Stroke (HPDF_Page page) |
Paint current path. More... | |
HPDF_STATUS | HPDF_Page_ClosePathStroke (HPDF_Page page) |
Close and paint current path. More... | |
HPDF_STATUS | HPDF_Page_Fill (HPDF_Page page) |
Fill current path using non-zero winding number rule. More... | |
HPDF_STATUS | HPDF_Page_Eofill (HPDF_Page page) |
Fill current path using even-odd rule. More... | |
HPDF_STATUS | HPDF_Page_FillStroke (HPDF_Page page) |
Fill current path using the even-odd rule. More... | |
HPDF_STATUS | HPDF_Page_EofillStroke (HPDF_Page page) |
Fill current path using the even-odd rule and then paint the path. More... | |
HPDF_STATUS | HPDF_Page_ClosePathFillStroke (HPDF_Page page) |
Close current path, fill current path using the non-zero winding number rule, then paint path. More... | |
HPDF_STATUS | HPDF_Page_ClosePathEofillStroke (HPDF_Page page) |
Close current path, fill current path using the even-odd rule and then paint the path. More... | |
HPDF_STATUS | HPDF_Page_EndPath (HPDF_Page page) |
Finish path object without filling or painting. More... | |
HPDF_STATUS | HPDF_Page_Clip (HPDF_Page page) |
Modify current clipping path by intersecting it with current path using the nonzero winding number rule. More... | |
HPDF_STATUS | HPDF_Page_Eoclip (HPDF_Page page) |
Modifies the current clipping path by intersecting it with current path using the even-odd rule. Clipping path is only modified after succeeding painting operator. To avoid painting current path, use HPDF_Page_EndPath(). More... | |
HPDF_STATUS | HPDF_Page_BeginText (HPDF_Page page) |
Begin text object and set text position to (0, 0) . More... | |
HPDF_STATUS | HPDF_Page_EndText (HPDF_Page page) |
Finish text object. More... | |
HPDF_STATUS | HPDF_Page_SetCharSpace (HPDF_Page page, HPDF_REAL value) |
Set text character spacing. More... | |
HPDF_STATUS | HPDF_Page_SetWordSpace (HPDF_Page page, HPDF_REAL value) |
Set text word spacing. More... | |
HPDF_STATUS | HPDF_Page_SetHorizontalScalling (HPDF_Page page, HPDF_REAL value) |
Set text horizontal scaling. More... | |
HPDF_STATUS | HPDF_Page_SetTextLeading (HPDF_Page page, HPDF_REAL value) |
Set text leading (line spacing). More... | |
HPDF_STATUS | HPDF_Page_SetFontAndSize (HPDF_Page page, HPDF_Font font, HPDF_REAL size) |
Set the type of font and size leading. More... | |
HPDF_STATUS | HPDF_Page_SetTextRenderingMode (HPDF_Page page, HPDF_TextRenderingMode mode) |
Set text rendering mode. More... | |
HPDF_STATUS | HPDF_Page_SetTextRise (HPDF_Page page, HPDF_REAL value) |
Move text position in vertical direction by the amount of value . More... | |
HPDF_STATUS | HPDF_Page_SetTextRaise (HPDF_Page page, HPDF_REAL value) |
Move text position in vertical direction by the amount of value . More... | |
HPDF_STATUS | HPDF_Page_MoveTextPos (HPDF_Page page, HPDF_REAL x, HPDF_REAL y) |
Change current text position using the specified offset values. More... | |
HPDF_STATUS | HPDF_Page_MoveTextPos2 (HPDF_Page page, HPDF_REAL x, HPDF_REAL y) |
Change current text position using the specified offset values. More... | |
HPDF_STATUS | HPDF_Page_MoveToNextLine (HPDF_Page page) |
Move current position for text showing depending on current text showing point and text leading. More... | |
HPDF_STATUS | HPDF_Page_ShowText (HPDF_Page page, const char *text) |
Put text at the current text position on the page. More... | |
HPDF_STATUS | HPDF_Page_ShowTextNextLine (HPDF_Page page, const char *text) |
Move current text position to the start of the next line, then put the text at the current text position on the page. More... | |
HPDF_STATUS | HPDF_Page_ShowTextNextLineEx (HPDF_Page page, HPDF_REAL word_space, HPDF_REAL char_space, const char *text) |
Move current text position to the start of the next line, then set word spacing and character spacing, finally put the text at the current text position on the page. More... | |
HPDF_STATUS | HPDF_Page_SetGrayFill (HPDF_Page page, HPDF_REAL value) |
Set the filling color (Gray). More... | |
HPDF_STATUS | HPDF_Page_SetGrayStroke (HPDF_Page page, HPDF_REAL value) |
Set stroking color (Gray). More... | |
HPDF_STATUS | HPDF_Page_SetRGBFill (HPDF_Page page, HPDF_REAL r, HPDF_REAL g, HPDF_REAL b) |
Set filling color (RGB). More... | |
HPDF_STATUS | HPDF_Page_SetRGBStroke (HPDF_Page page, HPDF_REAL r, HPDF_REAL g, HPDF_REAL b) |
Set stroke color (RGB). More... | |
HPDF_STATUS | HPDF_Page_SetRGBStrokeHex (HPDF_Page page, HPDF_UINT8 r, HPDF_UINT8 g, HPDF_UINT8 b) |
Set stroke color (RGB) using HPDF_UINT8 values. More... | |
HPDF_STATUS | HPDF_Page_SetCMYKFill (HPDF_Page page, HPDF_REAL c, HPDF_REAL m, HPDF_REAL y, HPDF_REAL k) |
Set filling color (CMYK). More... | |
HPDF_STATUS | HPDF_Page_SetCMYKStroke (HPDF_Page page, HPDF_REAL c, HPDF_REAL m, HPDF_REAL y, HPDF_REAL k) |
Set stroke color (CMYK). More... | |
HPDF_STATUS | HPDF_Page_ExecuteXObject (HPDF_Page page, HPDF_XObject obj) |
Draw XObject using current graphics context. More... | |
HPDF_STATUS | HPDF_Page_DrawImage (HPDF_Page page, HPDF_Image image, HPDF_REAL x, HPDF_REAL y, HPDF_REAL width, HPDF_REAL height) |
Show an image in one operation. More... | |
HPDF_STATUS | HPDF_Page_Circle (HPDF_Page page, HPDF_REAL x, HPDF_REAL y, HPDF_REAL radius) |
Append circle to current path. More... | |
HPDF_STATUS | HPDF_Page_Ellipse (HPDF_Page page, HPDF_REAL x, HPDF_REAL y, HPDF_REAL x_radius, HPDF_REAL y_radius) |
Append ellipse to current path. More... | |
HPDF_STATUS | HPDF_Page_Arc (HPDF_Page page, HPDF_REAL x, HPDF_REAL y, HPDF_REAL radius, HPDF_REAL ang1, HPDF_REAL ang2) |
Append circle arc to current path. More... | |
HPDF_STATUS | HPDF_Page_TextOut (HPDF_Page page, HPDF_REAL xpos, HPDF_REAL ypos, const char *text) |
Put text to the specified position. More... | |
HPDF_STATUS | 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) |
Put text inside the specified region. More... | |
Routines for feeding pages with graphical primitives.
HPDF_STATUS HPDF_Page_Arc | ( | HPDF_Page | page, |
HPDF_REAL | x, | ||
HPDF_REAL | y, | ||
HPDF_REAL | radius, | ||
HPDF_REAL | ang1, | ||
HPDF_REAL | ang2 | ||
) |
Append circle arc to current path.
Angles are given in degrees, with 0 degrees being vertical, upward, from the (x, y)
position.
page | Page object handle. |
x,y | Center point of the circle. |
radius | Radius of the circle. |
ang1 | Angle at the begining of the arc. |
ang2 | Angle at the end of the arc. It must be greater than ang1 . |
HPDF_STATUS HPDF_Page_BeginText | ( | HPDF_Page | page | ) |
Begin text object and set text position to (0, 0)
.
page | Page object handle. |
BT
HPDF_STATUS HPDF_Page_Circle | ( | HPDF_Page | page, |
HPDF_REAL | x, | ||
HPDF_REAL | y, | ||
HPDF_REAL | radius | ||
) |
Append circle to current path.
page | Page object handle. |
x,y | Center point of the circle. |
radius | Circle radius |
HPDF_STATUS HPDF_Page_Clip | ( | HPDF_Page | page | ) |
Modify current clipping path by intersecting it with current path using the nonzero winding number rule.
The clipping path is only modified after the succeeding painting operator. To avoid painting the current path, use the function HPDF_Page_EndPath().
Following painting operations will only affect the regions of the page contained by the clipping path. Initially, the clipping path includes the entire page. There is no way to enlarge the current clipping path or to replace the clipping path with a new one. The functions HPDF_Page_GSave() and HPDF_Page_GRestore() may be used to save and restore the current graphics state, including the clipping path.
page | Page object handle. |
W
HPDF_STATUS HPDF_Page_ClosePath | ( | HPDF_Page | page | ) |
Append straight line from current point to the start point of subpath.
Current point is moved to the start point of subpath.
page | Page object handle. |
h
HPDF_STATUS HPDF_Page_ClosePathEofillStroke | ( | HPDF_Page | page | ) |
Close current path, fill current path using the even-odd rule and then paint the path.
page | Page object handle. |
b*
HPDF_STATUS HPDF_Page_ClosePathFillStroke | ( | HPDF_Page | page | ) |
Close current path, fill current path using the non-zero winding number rule, then paint path.
page | Page object handle. |
b
HPDF_STATUS HPDF_Page_ClosePathStroke | ( | HPDF_Page | page | ) |
Close and paint current path.
page | Page object handle. |
s
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 | ||
) |
Concatenate the page's 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.
To change the coordinate system of the page to 300 dpi, use HPDF_Page_Concat() as follows.
Invoke HPDF_Page_GSave() before HPDF_Page_Concat(). Then the change by HPDF_Page_Concat() can be restored by invoking HPDF_Page_GRestore().
Application can call HPDF_Page_GSave() when graphics mode is HPDF_GMODE_PAGE_DESCRIPTION.
page | Page object handle. |
a,b,c,d,x,y | Transformation matrix to concatenate. |
cm
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 | ||
) |
Append Bézier curve to current path using control points (x1, y1) and (x2, y2) and (x3, y3), then set current point to (x3, y3).
page | Page object handle. |
x1,y1,x2,y2,x3,y3 | Control points for Bézier curve. |
c
HPDF_STATUS HPDF_Page_CurveTo2 | ( | HPDF_Page | page, |
HPDF_REAL | x2, | ||
HPDF_REAL | y2, | ||
HPDF_REAL | x3, | ||
HPDF_REAL | y3 | ||
) |
Append Bézier curve to current path using current point and (x2, y2) and (x3, y3) as control points. Then current point is set to (x3, y3).
page | Page object handle. |
x2,y2,x3,y3 | Control points for Bézier curve along with current point. |
v
HPDF_STATUS HPDF_Page_CurveTo3 | ( | HPDF_Page | page, |
HPDF_REAL | x1, | ||
HPDF_REAL | y1, | ||
HPDF_REAL | x3, | ||
HPDF_REAL | y3 | ||
) |
Append 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).
page | Page object handle. |
x1,y1,x3,y3 | Control points for Bézier curve along with current point. |
y
HPDF_STATUS HPDF_Page_DrawImage | ( | HPDF_Page | page, |
HPDF_Image | image, | ||
HPDF_REAL | x, | ||
HPDF_REAL | y, | ||
HPDF_REAL | width, | ||
HPDF_REAL | height | ||
) |
Show an image in one operation.
page | Page object handle. |
image | Image object handle |
x,y | Lower-left point of the region where image is displayed. |
width | Width of the region where image is displayed. |
height | Height of the region where image is displayed. |
HPDF_STATUS HPDF_Page_Ellipse | ( | HPDF_Page | page, |
HPDF_REAL | x, | ||
HPDF_REAL | y, | ||
HPDF_REAL | x_radius, | ||
HPDF_REAL | y_radius | ||
) |
Append ellipse to current path.
page | Page object handle. |
x,y | Center point of the ellipse. |
x_radius,y_radius | Horizontal and vertical radii of the ellipse. |
HPDF_STATUS HPDF_Page_EndPath | ( | HPDF_Page | page | ) |
Finish path object without filling or painting.
page | Page object handle. |
n
HPDF_STATUS HPDF_Page_EndText | ( | HPDF_Page | page | ) |
Finish text object.
page | Page object handle. |
ET
HPDF_STATUS HPDF_Page_Eoclip | ( | HPDF_Page | page | ) |
Modifies the current clipping path by intersecting it with current path using the even-odd rule. Clipping path is only modified after succeeding painting operator. To avoid painting current path, use HPDF_Page_EndPath().
Following painting operations will only affect page regions contained by the clipping path. Clipping path includes entire page initially. There is no way to enlarge current clipping path or to replace clipping path with new one. Functions HPDF_Page_GSave() and HPDF_Page_GRestore() may be used to save and restore the current graphics state, including the clipping path.
page | Page object handle. |
W*
HPDF_STATUS HPDF_Page_Eofill | ( | HPDF_Page | page | ) |
Fill current path using even-odd rule.
page | Page object handle. |
f*
HPDF_STATUS HPDF_Page_EofillStroke | ( | HPDF_Page | page | ) |
Fill current path using the even-odd rule and then paint the path.
page | Page object handle. |
B*
HPDF_STATUS HPDF_Page_ExecuteXObject | ( | HPDF_Page | page, |
HPDF_XObject | obj | ||
) |
Draw XObject using current graphics context.
This is used by HPDF_Page_DrawImage() to draw the HPDF_Image by first calling HPDF_Page_GSave() and HPDF_Page_Concat() and then calling HPDF_Page_GRestore() after HPDF_Page_ExecuteXObject(). It could be used manually to rotate an image.
page | Page object handle. |
obj | XObject handle like an image. |
Do
HPDF_STATUS HPDF_Page_Fill | ( | HPDF_Page | page | ) |
Fill current path using non-zero winding number rule.
page | Page object handle. |
f
HPDF_STATUS HPDF_Page_FillStroke | ( | HPDF_Page | page | ) |
Fill current path using the even-odd rule.
page | Page object handle. |
B
HPDF_STATUS HPDF_Page_GRestore | ( | HPDF_Page | page | ) |
Restore graphics state which is saved by HPDF_Page_GSave().
page | Page object handle. |
Q
HPDF_STATUS HPDF_Page_GSave | ( | HPDF_Page | page | ) |
Save the page's current graphics state to the stack.
Application can call HPDF_Page_GSave() and can restore saved state by calling HPDF_Page_GRestore().
Saved by HPDF_Page_GSave() state parameters are:
page | Page object handle. |
q
HPDF_STATUS HPDF_Page_LineTo | ( | HPDF_Page | page, |
HPDF_REAL | x, | ||
HPDF_REAL | y | ||
) |
Append path from current point to specified point.
page | Page object handle. |
x,y | End point of the path |
l
HPDF_STATUS HPDF_Page_MoveTextPos | ( | HPDF_Page | page, |
HPDF_REAL | x, | ||
HPDF_REAL | y | ||
) |
Change current text position using the specified offset values.
If the current text position is (x1, y1), the new text position will be (x1 + x, y1 + y).
page | Page object handle. |
x,y | Offset to new text position. |
Td
HPDF_STATUS HPDF_Page_MoveTextPos2 | ( | HPDF_Page | page, |
HPDF_REAL | x, | ||
HPDF_REAL | y | ||
) |
Change current text position using the specified offset values.
If the current text position is (x1, y1), the new text position will be (x1 + x, y1 + y).
Also, text leading is set to -y.
page | Page object handle. |
x,y | Offset to new text position. |
TD
HPDF_STATUS HPDF_Page_MoveTo | ( | HPDF_Page | page, |
HPDF_REAL | x, | ||
HPDF_REAL | y | ||
) |
Start new subpath and move current point for drawing path.
HPDF_Page_MoveTo() set starting point for the path to (x, y).
page | Page object handle. |
x,y | Starting point for drawing path |
m
HPDF_STATUS HPDF_Page_MoveToNextLine | ( | HPDF_Page | page | ) |
Move current position for text showing depending on current text showing point and text leading.
New position is calculated with current text transition matrix.
page | Page object handle. |
T*
HPDF_STATUS HPDF_Page_Rectangle | ( | HPDF_Page | page, |
HPDF_REAL | x, | ||
HPDF_REAL | y, | ||
HPDF_REAL | width, | ||
HPDF_REAL | height | ||
) |
Append rectangle to the current path.
page | Page object handle. |
x,y | Lower-left point of the rectangle. |
width | Width of the rectangle. |
height | Height of the rectangle. |
re
HPDF_STATUS HPDF_Page_Rotate | ( | HPDF_Page | page, |
HPDF_REAL | a | ||
) |
Concatenate the page's transformation matrix with rotate matrix.
Coordinate system axes are rotated by angle a
counter clocwise.
page | Page object handle. |
a | Coordinate system rotate angle (radians). |
cm
HPDF_Page_Concat (page, cos(q), sin(q), -sin(q), cos(q), 0, 0);
HPDF_STATUS HPDF_Page_RotateDeg | ( | HPDF_Page | page, |
HPDF_REAL | degrees | ||
) |
Concatenate the page's transformation matrix with rotate matrix.
Coordinate system axes are rotated by angle a
counter clocwise (degrees).
page | Page object handle. |
degrees | Coordinate system rotate angle (degrees). |
cm
HPDF_STATUS HPDF_Page_Scale | ( | HPDF_Page | page, |
HPDF_REAL | sx, | ||
HPDF_REAL | sy | ||
) |
Concatenate the page's transformation matrix with scale matrix.
Coordinate system is scaled so 1 unit horizontal dimension is same as sx
units and 1 unit in vertical dimension is same as sy
units in new coordinate system..
page | Page object handle. |
sx,sy | Coordinate system scale values. |
cm
HPDF_Page_Concat (page, sx, 0, 0, sy, 0, 0);
HPDF_STATUS HPDF_Page_SetCharSpace | ( | HPDF_Page | page, |
HPDF_REAL | value | ||
) |
Set text character spacing.
page | Page object handle. |
value | Character spacing (initial value is 0 ). |
Tc
HPDF_STATUS HPDF_Page_SetCMYKFill | ( | HPDF_Page | page, |
HPDF_REAL | c, | ||
HPDF_REAL | m, | ||
HPDF_REAL | y, | ||
HPDF_REAL | k | ||
) |
Set filling color (CMYK).
page | Page object handle. |
c,m,y,k | Level of each color element. They must be between 0 and 1 . |
k
HPDF_STATUS HPDF_Page_SetCMYKStroke | ( | HPDF_Page | page, |
HPDF_REAL | c, | ||
HPDF_REAL | m, | ||
HPDF_REAL | y, | ||
HPDF_REAL | k | ||
) |
Set stroke color (CMYK).
page | Page object handle. |
c,m,y,k | Level of each color element. They must be between 0 and 1 . |
K
HPDF_STATUS HPDF_Page_SetDash | ( | HPDF_Page | page, |
const HPDF_REAL * | dash_pattern, | ||
HPDF_UINT | num_elem, | ||
HPDF_REAL | phase | ||
) |
Set dash pattern for lines in the page.
page | Page object handle. |
dash_pattern | Pattern of dashes and gaps used to stroke paths. |
num_elem | Number of elements in dash_pattern, 0 <= num_param <= 8 . |
phase | Phase in which pattern begins (default is 0 ). |
dash_ptn = NULL
, num_elem = 0
, phase = 0
(default for new page)
dash_ptn = [3]
, num_elem = 1
, phase = 1
dash_ptn = [7,]
, num_elem = 2
, phase = 2
dash_ptn = [8,]
, num_elem = 4
, phase = 0
d
HPDF_STATUS HPDF_Page_SetExtGState | ( | HPDF_Page | page, |
HPDF_ExtGState | ext_gstate | ||
) |
Apply graphics state to page.
page | Page object handle. |
ext_gstate | Extended graphics state object handle. |
gs
HPDF_STATUS HPDF_Page_SetFontAndSize | ( | HPDF_Page | page, |
HPDF_Font | font, | ||
HPDF_REAL | size | ||
) |
Set the type of font and size leading.
page | Page object handle. |
font | Font object handle. |
size | Font size. |
Tf
HPDF_STATUS HPDF_Page_SetGrayFill | ( | HPDF_Page | page, |
HPDF_REAL | value | ||
) |
Set the filling color (Gray).
page | Page object handle. |
value | Value of the gray level between 0 and 1 . |
g
HPDF_STATUS HPDF_Page_SetGrayStroke | ( | HPDF_Page | page, |
HPDF_REAL | value | ||
) |
Set stroking color (Gray).
page | Page object handle. |
value | Value of the gray level between 0 and 1 . |
G
HPDF_STATUS HPDF_Page_SetHorizontalScalling | ( | HPDF_Page | page, |
HPDF_REAL | value | ||
) |
Set text horizontal scaling.
page | Page object handle. |
value | Value of horizontal scaling (initially 100 ). |
Tz
HPDF_STATUS HPDF_Page_SetLineCap | ( | HPDF_Page | page, |
HPDF_LineCap | line_cap | ||
) |
Set lines endpoints shape style.
page | Page object handle. |
line_cap | The line cap style (one of the following). |
Value | Image | Description |
---|---|---|
HPDF_BUTT_END | ![]() | Line is squared off at path endpoint. |
HPDF_ROUND_END | ![]() | End of line becomes a semicircle with center at path endpoint. |
HPDF_PROJECTING_SQUARE_END | ![]() | Line continues beyond endpoint, goes on half the endpoint stroke width. |
Default line_cap
is HPDF_BUTT_END
J
HPDF_STATUS HPDF_Page_SetLineJoin | ( | HPDF_Page | page, |
HPDF_LineJoin | line_join | ||
) |
Set line join shape style.
page | Page object handle. |
line_join | The line join style (one of the following). |
Value | Image | Description |
---|---|---|
HPDF_MITER_JOIN | ![]() | Outer edges of the strokes for the two segments are extended until they meet at an angle. |
HPDF_ROUND_JOIN | ![]() | An arc of a circle with a diameter equal to the line width is drawn around the point where the two segments meet. |
HPDF_BEVEL_JOIN | ![]() | The two segments are finished with butt caps and the resulting notch beyond the ends of the segments are filled with a triangle. |
Default line_join
is HPDF_MITER_JOIN.
j
HPDF_STATUS HPDF_Page_SetLineWidth | ( | HPDF_Page | page, |
HPDF_REAL | line_width | ||
) |
Set width of the line used to stroke paths.
page | Page object handle. |
line_width | The line width to use. |
Default line_width
is 1
.
w
HPDF_STATUS HPDF_Page_SetMiterLimit | ( | HPDF_Page | page, |
HPDF_REAL | miter_limit | ||
) |
Set miter limit for line joins.
page | Page object handle. |
miter_limit | Miter limit value. |
Default miter_limit
is HPDF_DEF_MITERLIMIT.
angle
less than 90
degrees, a limit of 2.0
converts them for angle
less than 60 degrees, and a limit of 10.0 converts them for angle less than approximately 11.5 degrees.M
HPDF_STATUS HPDF_Page_SetRGBFill | ( | HPDF_Page | page, |
HPDF_REAL | r, | ||
HPDF_REAL | g, | ||
HPDF_REAL | b | ||
) |
Set filling color (RGB).
page | Page object handle. |
r,g,b | Level of each color element. They must be between 0 and 1 . |
rg
HPDF_STATUS HPDF_Page_SetRGBStroke | ( | HPDF_Page | page, |
HPDF_REAL | r, | ||
HPDF_REAL | g, | ||
HPDF_REAL | b | ||
) |
Set stroke color (RGB).
page | Page object handle. |
r,g,b | Level of each color element. They must be between 0 and 1 . |
RG
HPDF_STATUS HPDF_Page_SetRGBStrokeHex | ( | HPDF_Page | page, |
HPDF_UINT8 | r, | ||
HPDF_UINT8 | g, | ||
HPDF_UINT8 | b | ||
) |
Set stroke color (RGB) using HPDF_UINT8 values.
page | Page object handle. |
r,g,b | Level of each color element. They must be between 0x00 and 0xFF . |
RG
HPDF_STATUS HPDF_Page_SetTextLeading | ( | HPDF_Page | page, |
HPDF_REAL | value | ||
) |
Set text leading (line spacing).
page | Page object handle. |
value | Value of text leading (initially 0 ). |
TL
HPDF_STATUS HPDF_Page_SetTextRaise | ( | HPDF_Page | page, |
HPDF_REAL | value | ||
) |
Move text position in vertical direction by the amount of value
.
Useful for making subscripts or superscripts.
page | Page object handle. |
value | Text rise, in user space units. |
Ts
HPDF_STATUS HPDF_Page_SetTextRenderingMode | ( | HPDF_Page | page, |
HPDF_TextRenderingMode | mode | ||
) |
Set text rendering mode.
page | Page object handle. |
mode | Text rendering mode (one of the following). |
Value | Image | Description |
---|---|---|
HPDF_FILL | ![]() | Fill text. |
HPDF_STROKE | ![]() | Stroke text. |
HPDF_FILL_THEN_STROKE | ![]() | Fill, then stroke text. |
HPDF_INVISIBLE | — | Neither fill nor stroke text (invisible). |
HPDF_FILL_CLIPPING | ![]() | Fill text and add to path for clipping. |
HPDF_STROKE_CLIPPING | ![]() | Stroke text and add to path for clipping. |
HPDF_FILL_STROKE_CLIPPING | ![]() | Fill, then stroke text and add to path for clipping. |
HPDF_CLIPPING | — | Add text to path for clipping. |
Default mode
is HPDF_FILL.
Tr
HPDF_STATUS HPDF_Page_SetTextRise | ( | HPDF_Page | page, |
HPDF_REAL | value | ||
) |
Move text position in vertical direction by the amount of value
.
Useful for making subscripts or superscripts.
page | Page object handle. |
value | Text rise, in user space units. |
Ts
HPDF_STATUS HPDF_Page_SetWordSpace | ( | HPDF_Page | page, |
HPDF_REAL | value | ||
) |
Set text word spacing.
page | Page object handle. |
value | Word spacing (initial value is 0 ). |
Tw
HPDF_STATUS HPDF_Page_ShowText | ( | HPDF_Page | page, |
const char * | text | ||
) |
Put text at the current text position on the page.
page | Page object handle. |
text | Text to put to page. |
Tj
HPDF_STATUS HPDF_Page_ShowTextNextLine | ( | HPDF_Page | page, |
const char * | text | ||
) |
Move current text position to the start of the next line, then put the text at the current text position on the page.
page | Page object handle. |
text | Text to put to page. |
'
(apostrophe) HPDF_STATUS HPDF_Page_ShowTextNextLineEx | ( | HPDF_Page | page, |
HPDF_REAL | word_space, | ||
HPDF_REAL | char_space, | ||
const char * | text | ||
) |
Move current text position to the start of the next line, then set word spacing and character spacing, finally put the text at the current text position on the page.
page | Page object handle. |
text | Text to put to page. |
word_space | Word spacing value |
char_space | Char spacing value |
"
(quote) HPDF_STATUS HPDF_Page_Skew | ( | HPDF_Page | page, |
HPDF_REAL | a, | ||
HPDF_REAL | b | ||
) |
Concatenate the page's transformation matrix with skew matrix.
Coordinate system is skewed by an angle a
at x axis and by angle b
at y axis.
page | Page object handle. |
a,b | Coordinate system skew values. |
cm
HPDF_Page_Concat (page, 1, tan(a), tan(b), 1, 0, 0);
HPDF_STATUS HPDF_Page_Stroke | ( | HPDF_Page | page | ) |
Paint current path.
page | Page object handle. |
S
HPDF_STATUS HPDF_Page_TextOut | ( | HPDF_Page | page, |
HPDF_REAL | xpos, | ||
HPDF_REAL | ypos, | ||
const char * | text | ||
) |
Put text to the specified position.
page | Page object handle. |
xpos,ypos | Point position where the text is displayed. |
text | Text to show. |
HPDF_STATUS 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 | ||
) |
Put text inside the specified region.
page | Page object handle. | ||||||||||
left,top,right,bottom | Coordinates of corners of the region to output text. | ||||||||||
text | Text to show. | ||||||||||
align | Text alignment (one of the following).
| ||||||||||
len | If not NULL , the number of characters printed in the area is returned. |
HPDF_STATUS HPDF_Page_Translate | ( | HPDF_Page | page, |
HPDF_REAL | dx, | ||
HPDF_REAL | dy | ||
) |
Concatenate the page's transformation matrix with translation matrix.
Coordinate system is translated by dx
and dy
coordinate units.
page | Page object handle. |
dx,dy | Coordinate system translate distance. |
cm
HPDF_Page_Concat (page, 1, 0, 0, 1, dx, dy);