API referenceCore SDK

pdfDrawNGon

Draw a regular N-sided polygon centered at (PosX, PosY).

C
BOOL32 __stdcall pdfDrawNGon(PPDF IPDF, double PosX, double PosY, double Radius, double Alpha, uint32_t NumSides, TPathFillMode FillMode);
Delphi
function pdfDrawNGon(const IPDF: PPDF; PosX, PosY, Radius, Alpha: Double; NumSides: Cardinal; FillMode: TPathFillMode): LongBool; stdcall;

Purpose. Draw a regular N-sided polygon centered at (PosX, PosY).

Parameters.

ParameterDescription
IPDFDocument handle.
PosX, PosYCenter point.
RadiusCircumradius.
AlphaRotation angle of the first vertex.
NumSidesNumber of polygon sides.
FillModeThe shared 12-value fill-mode convention established in Path Construction & Basic Shapes.

Return value. True on success; False if there is no current content stream.

See also. The shared FillMode table.

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
Core SDK
Category

Vector Graphics

Exported names

pdfDrawNGon

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.