Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
The function draws a rectangle with elliptical corners.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
DynaPDF | 3.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example |
---|---|---|
The PDF reference returned from DynaPDF.New. | ||
PosX | X-Coordinate of rectangle | $x |
PosY | Y-Coordinate of rectangle | $y |
Width | Width of the rectangle | $w |
Height | Height of the rectangle | $h |
RadiusWidth | The radius for width. | 20 |
RadiusHeight | The radius for height. | 30 |
FillMode | Fill mode. Can be FillNoClose, StrokeNoClose, FillStrokeNoClose, Fill, Stroke, FillStroke, FillEvOdd, FillStrokeEvOdd, FillEvOddNoClose, FillStrokeEvOddNoClose, NoFill or Close. | "fill" |
Returns OK or error.
See also RoundRectEx function in DynaPDF manual.
Draw blue round rectangle width different x/y radii:
Set Variable [ $r ; Value: MBS("DynaPDF.SetStrokeColor"; $pdf; 0; 0; 0) ]
Set Variable [ $r ; Value: MBS("DynaPDF.SetFillColor"; $pdf; 0; 0; ,8) ]
Set Variable [ $r ; Value: MBS("DynaPDF.SetLineWidth"; $pdf; 5) ]
Set Variable [ $r ; Value: MBS( "DynaPDF.RoundRectEx"; $pdf; 100; 100; 300; 200; 30; 20; "fillStroke" ) ]
Draw page number inside a round rectangle box:
# set color white to fill and light gray for frame
Set Variable [ $r ; Value: MBS( "DynaPDF.SetStrokeColor"; $pdf; ,1; ,1; ,1) ]
Set Variable [ $r ; Value: MBS( "DynaPDF.SetFillColor"; $pdf; 1; 1; 1) ]
# draw round rect with one point border
Set Variable [ $r ; Value: MBS( "DynaPDF.SetLineWidth"; $pdf; 1) ]
Set Variable [ $r ; Value: MBS( "DynaPDF.RoundRectEx"; $pdf; 50; $pageHeight - 50; $pageWidth - 100; 30; 5; 5; "FillStroke" ) ]
#
# set color black
Set Variable [ $r ; Value: MBS( "DynaPDF.SetStrokeColor"; $pdf; 0; 0; 0) ]
Set Variable [ $r ; Value: MBS( "DynaPDF.SetFillColor"; $pdf; 0; 0; 0) ]
# and write centered text
Set Variable [ $r ; Value: MBS( "DynaPDF.SetFont"; $pdf; "Helvetica"; 0; 20) ]
Set Variable [ $r ; Value: MBS( "DynaPDF.WriteFTextEx"; $pdf; 50; $pageHeight - 50; $pageWidth-100; 30; "center"; GetAsText($PageNumber) & " of " & $PageCount) ]
This function checks for a license.
Created 18th August 2014, last changed 13th December 2023