DynaPDF Manual - Page 59

Previous Page 58   Index   Next Page 60

Content parsing & editing
Page 59 of 860
}
pdfClosePath(PDF, fmStroke);
pdfEndPage(PDF);
}
}
}
psrDeleteParserContext(&ctx);
if (pdfOpenOutputFileW(PDF, OutFile) && pdfCloseFile(PDF))
printf("Ok
: \"%S\"\n", OutFile);
else
printf("Error: \"%S\"\n", OutFile);
}
Return value:
If the function succeeds the return value is 1. If the function fails the return value is 0.
GetSelBBox2
Syntax:
LBOOL psrGetSelBBox2(
const PPDF* IPDF,
// PDF instance pointer
struct TTextSelection* SelText, // Required. Structure filled with
// data by FindText().
struct TFltPoint QuadPoint[4])
// Required. Array of TFltPoint
The function returns the bounding box as quad points of a single node or glyph of the current
selection. This function is useful for rotated text.
The four points are computed in top down coordinates in the following order:
p2
p1
p3
p0
The structure TTextSelection is a single linked list. The next node, if any, is stored in the member
Next.
Example (C++):
This code shows how to access all nodes of a selection but note that the contents of a page will
be overriden when WriteToPage() will be called. Therefore, it is sometimes required to
temporarily store the quad points in an array so that they can be drawn after WriteToPage() was
called.
void DrawSelection(PPDF* PDF, TTextSelection &Curr)
{
TFltPoint q[4];
 

Previous topic: GetSelBBox

Next topic: GetSelText