DynaPDF Manual - Page 774

Previous Page 773   Index   Next Page 775

Function Reference
Page 774 of 821
SetTemplBBox
Syntax:
LBOOL pdfSetTemplBBox(
const PPDF* IPDF,
// Instance pointer
UI32 Handle,
// Template handle
TPageBoundary Boundary, // pbMediaBox or pbCropBox
struct TPDFRect* BBox)
// New bounding box or NULL to delete it
The function sets or changes a bounding box of a template. Templates support the bounding boxes
pbMediaBox and pbCropBox only. The latter one is considered by PlaceTemplateEx() only.
A crop box can be set to clip the contents of a template without changing its bounding box. This can
be useful when placing imported pages on another page.
If BBox is set to NULL, the bounding box is deleted. Note that only the crop box can be deleted.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
SetTextDrawMode
Syntax:
LBOOL pdfSetTextDrawMode(
const PPDF* IPDF, // Instance pointer
TDrawMode Mode)
// see below
typedef enum
{
dmNormal
= 0, // Default
dmStroke
= 1, // Stroke the text (outlines only)
dmFillStroke
= 2, // Fill and stroke the text
dmInvisible
= 3, // Neither fill nor stroke text (invisible)
dmFillClip
= 4, // Fill text and add to path for clipping
dmStrokeClip
= 5, // Stroke text and add to path for clipping
dmFillStrokeClip = 6, // Fill & stroke text and add to path for clipping
dmClipping
= 7
// Add the text to path for clipping
}TDrawMode;
The text draw mode specifies how text should be rendered. Texts can be used as clipping paths such
as normal vector graphics; however, the usage is not the same. To use a text as clipping path save
the graphics state, set the text draw mode to a clipping mode, paint the objects which should be
clipped into the path and restore the graphics state.
Note that the functions BeginClipPath() and ClipPath() can not be used to define a text as clipping
path (see the example below).
Default value = dmNormal
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
 

Previous topic: SetStrokeColorSpace, SetTabLen

Next topic: How to use text as clipping path?


Start Chat