Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
DynaPDF.DrawNGon
Draws a n-gon.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
DynaPDF | 10.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameters
Parameter | Description | Example |
---|---|---|
The PDF reference returned from DynaPDF.New. | ||
PosX | X-Coordinate of the midpoint of the ngon. | |
PosY | Y-Coordinate of the midpoint of the ngon. | |
Radius | The radius. | |
Alpha | Rotation angle in degrees. | |
NumSides | Number of sides. Must be greater 2. | 7 |
FillMode | Fill mode. Can be FillNoClose, StrokeNoClose, FillStrokeNoClose, Fill, Stroke, FillStroke, FillEvOdd, FillStrokeEvOdd, FillEvOddNoClose, FillStrokeEvOddNoClose, NoFill or Close. | "fill" |
Result
Returns OK or error.
Description
Draws a n-gon.A n-gon is a polygon with "n" number of sides. The minimum number of sides is three.
A n-gon is a closed path that can be filled, stroked or both. It is also possible to draw a n-gon invisible to apply the filling rules nonzero winding number or even-odd. The filling rules are described at DynaPDF.ClipPath. The parameter FillMode is ignored if the circle is drawn inside a clipping path. The fill modes are described at DynaPDF.ClosePath.
If the function succeeds the return value is OK, otherwise an error.
See also DrawNGon function in DynaPDF manual.
Examples
Draw various n-edge objects on top of each other in various shades of gray:
Set Variable [ $r ; Value: MBS("DynaPDF.SetStrokeColor"; $pdf; 0; 0; 0) ]
Set Variable [ $r ; Value: MBS("DynaPDF.DrawNGon"; $pdf; 200; 600; 100; 1; 9; "Stroke") ]
Set Variable [ $r ; Value: MBS("DynaPDF.SetStrokeColor"; $pdf; ,1; ,1; ,1) ]
Set Variable [ $r ; Value: MBS("DynaPDF.DrawNGon"; $pdf; 200; 600; 100; 1; 8; "Stroke") ]
Set Variable [ $r ; Value: MBS("DynaPDF.SetStrokeColor"; $pdf; ,2; ,2; ,2) ]
Set Variable [ $r ; Value: MBS("DynaPDF.DrawNGon"; $pdf; 200; 600; 100; 1; 7; "Stroke") ]
Set Variable [ $r ; Value: MBS("DynaPDF.SetStrokeColor"; $pdf; ,3; ,3; ,3) ]
Set Variable [ $r ; Value: MBS("DynaPDF.DrawNGon"; $pdf; 200; 600; 100; 1; 6; "Stroke") ]
Set Variable [ $r ; Value: MBS("DynaPDF.SetStrokeColor"; $pdf; ,4; ,4; ,4) ]
Set Variable [ $r ; Value: MBS("DynaPDF.DrawNGon"; $pdf; 200; 600; 100; 1; 5; "Stroke") ]
Set Variable [ $r ; Value: MBS("DynaPDF.SetStrokeColor"; $pdf; ,5; ,5; ,5) ]
Set Variable [ $r ; Value: MBS("DynaPDF.DrawNGon"; $pdf; 200; 600; 100; 1; 4; "Stroke") ]
See also
- DynaPDF.ClipPath
- DynaPDF.ClosePath
- DynaPDF.DrawArc
- DynaPDF.DrawChord
- DynaPDF.DrawPie
- DynaPDF.New
- DynaPDF.SetStrokeColor
Release notes
- Version 10.5
- Added DynaPDF.DrawNGon, DynaPDF.GetDefaultBarcodeParameters and DynaPDF.InsertBarcode functions.
Blog Entries
This function checks for a license.
Created 18th September 2020, last changed 23th November 2020