Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples
Videos
New in version: 9.0   9.1   9.2   9.3   9.4   9.5   10.0   10.1   10.2   10.3    Statistic  

GMImage.DrawRoundRectangle

Draw a rounded rectangle.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
GraphicsMagick 3.0 Yes Yes Yes Yes Yes
MBS( "GMImage.DrawRoundRectangle"; ImageRef; upperLeftX; upperLeftY; lowerRightX; lowerRightY; cornerWidth; cornerHeight )   More

Parameters

Parameter Description Example value
ImageRef The image reference number. 1
upperLeftX Upper left X position.
upperLeftY Upper left Y position.
lowerRightX Lower right X position.
lowerRightY Lower right Y position.
cornerWidth The width of the corner arc.
cornerHeight The height of the corner arc.

Result

Returns OK or error message.

Description

Draw a rounded rectangle.
Draw a rounded rectangle using stroke color and thickness, with specified center coordinate, specified width and height, and specified corner width and height. If a fill color is specified, then the object is filled.

If you have an open path, the command is added there for later drawing with GMImage.DrawPath.

Examples

Creates a new image and draws a round rectangle inside:

Set Variable [ $img; Wert:MBS("GMImage.New"; "300x200"; "RGB 1 1 1") ]
Set Variable [ $r; Wert:MBS("GMImage.SetStrokeColor"; $img; "RGB 1 0 0") ]
Set Variable [ $r; Wert:MBS("GMImage.SetFillColor"; $img; "RGB 0 0 1") ]
Set Variable [ $r; Wert:MBS("GMImage.SetLineWidth"; $img; 5) ]
Set Variable [ $r; Wert:MBS("GMImage.DrawRoundRectangle"; $img; 50; 50; 250; 150; 10; 10) ]
Set Variable [ $png; Wert:MBS("GMImage.WriteToPNGContainer"; $img; "test.png") ]
Set Variable [ $r; Wert:MBS("GMImage.Release"; $img) ]
Set Field [ Drawing::Image; $png ]

See also

Example Databases

Created 18th August 2014, last changed 13th January 2020


GMImage.DrawRectangle   -   GMImage.Edge

Feedback: Report problem or ask question.




Links
MBS FileMaker Plugins