| Category | Text output (curved baseline) |
|---|---|
| Note | DrawOptions is reserved/unused |
Purpose — Draw text along a circular arc — the real curved-baseline writer that pdfWriteAngleText's Radius/YOrigin parameters looked like they should provide, but don't.
Description — Places the first glyph at Angle degrees around the circle centered at (XPos, YPos) with radius Radius, advancing counter-clockwise; each subsequent glyph's angular position is advanced by glyphWidth / Radius (arc length → subtended angle), and each glyph is individually drawn via pdfWriteAngleText rotated tangent to the circle (+90° from the radial angle, "upright outward"). This means arc text inherits the same weaker Unicode-encoding behavior documented for pdfWriteAngleText in E01 — non-TrueType glyphs go through the ambient CP_ACP code page, not the WinAnsi-safe path.
Declarations
int32_t __stdcall pdfDrawTextArc(PPDF IPDF, double XPos, double YPos, double Radius, double Angle, const char* Text, int32_t DrawOptions);
int32_t __stdcall pdfDrawTextArcA(PPDF IPDF, double XPos, double YPos, double Radius, double Angle, const char* Text, int32_t DrawOptions);
int32_t __stdcall pdfDrawTextArcW(PPDF IPDF, double XPos, double YPos, double Radius, double Angle, const wchar_t* Text, int32_t DrawOptions);
function pdfDrawTextArcA(const IPDF: PPDF; XPos, YPos, Radius, Angle: Double; Text: PAnsiChar; DrawOptions: Integer): Integer; stdcall; external 'LumasPdf.dll';
function pdfDrawTextArcW(const IPDF: PPDF; XPos, YPos, Radius, Angle: Double; Text: PWideChar; DrawOptions: Integer): Integer; stdcall; external 'LumasPdf.dll';
Parameters
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Instance handle with an open page and selected font. |
XPos, YPos | Double | Arc center. |
Radius | Double | Arc radius; must be > 0 or the call fails. |
Angle | Double | Starting angle in degrees for the first glyph. |
Text | string | Text to place along the arc, one glyph at a time. |
DrawOptions | Integer | Accepted for ABI compatibility; the source comment marks it explicitly "reserved" and it is not read anywhere in the implementation. |
Return value — 1 on success; 0 if no page is open, no font is selected, Radius <= 0, or Text is empty.
See also — pdfWriteAngleText
C# (P/Invoke)
public static extern int pdfDrawTextArcW(IntPtr IPDF, double XPos, double YPos, double Radius, double Angle, IntPtr Text, int DrawOptions);
public static extern int pdfDrawTextArc(IntPtr IPDF, double XPos, double YPos, double Radius, double Angle, IntPtr Text, int DrawOptions);
public static extern int pdfDrawTextArcA(IntPtr IPDF, double XPos, double YPos, double Radius, double Angle, IntPtr Text, int DrawOptions);
Vector Graphics
pdfDrawTextArcW
pdfDrawTextArc
pdfDrawTextArcA
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.