Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

DynaPDF Manual - Page 735

Previous Page 734   Index   Next Page 736

Function Reference
Page 735 of 750
WriteAngleText
Syntax:
LBOOL pdfWriteAngleText(
const PPDF* IPDF,
// Instance pointer
const char* AText, // Text to be printed
double Angle,
// Angle alpha in degrees
double PosX,
// X-Coordinate of the text
double PosY,
// Y-Coordinate of the text
double Radius,
// Output radius or 0, see below
double YOrigin)
// Origin of the y-axis, see below
The function draws a text in a user defined angle around a radius. If the coordinate system is
bottom-up the point PosX, PosY defines the lower-left corner of the text, otherwise the top-left corner.
The parameter Radius moves the text in the rotated coordinate system on the x-axis so that the string
will be printed on a radius. The parameter YOrigin moves the string also in the rotated coordinate
system, but on the y-axis; the origin is measured in bottom-up coordinates independently of the
current coordinate system. The y-origin is required when the text should be centered on the y-axis.
For instance, if the coordinate system is bottom-up, the point PosX, PosY defines the baseline of the
text that is the center of the rotation. If the text should be centred on the y-axis the origin of the y-axis
must be moved downward by the half cap height of the current font (see example below).
Remarks:
This function is implemented in an Ansi and Unicode compatible version.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
Example (C++):
#include "dynapdf.h"
using namespace DynaPDF;
// First we declare an error callback function
SI32 PDF_CALL PDFError(const void* Data, SI32 ErrCode, const char*
ErrMessage, SI32 ErrType)
{
printf("%s\n", ErrMessage);
return 0;
}
int main(int argc, char* argv[])
{
double alpha = 0.0;
double y, pageCenter;
SI32 i;
 

Previous topic: WebLink

Next topic: Output rectangle