API referenceText

pdfDrawTextArc

Draw text along a circular arc — the real curved-baseline

CategoryText output (curved baseline)
NoteDrawOptions 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

C
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);
Delphi
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

ParameterTypeDescription
IPDFPPDFInstance handle with an open page and selected font.
XPos, YPosDoubleArc center.
RadiusDoubleArc radius; must be > 0 or the call fails.
AngleDoubleStarting angle in degrees for the first glyph.
TextstringText to place along the arc, one glyph at a time.
DrawOptionsIntegerAccepted for ABI compatibility; the source comment marks it explicitly "reserved" and it is not read anywhere in the implementation.

Return value1 on success; 0 if no page is open, no font is selected, Radius <= 0, or Text is empty.

See alsopdfWriteAngleText

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
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);
Area
Text
Category

Vector Graphics

Exported names

pdfDrawTextArcW pdfDrawTextArc pdfDrawTextArcA

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.