Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   Crossplatform   Server (Not)   Client   Components   Old   Guides
New in version: 4.0   4.1   4.2   4.3   4.4   5.0   5.1   5.2   5.3   5.4   6.0   6.1   6.2   6.3   6.4   6.5   7.0   7.1    Statistic  


Draw a rounded rectangle.

Component: GraphicsMagick
Version: 3.0
Mac OS X: Yes
Windows: Yes
Server: Yes
FileMaker Cloud: Yes

MBS( "GMImage.DrawRoundRectangle"; ImageRef; centerX; centerY; width; height; cornerWidth; cornerHeight )


Parameter Description Example value
ImageRef The image reference (a number returned from the GMImage.New functions) 1
centerX The X coordinate for center position.
centerY The Y coordinate for center position.
width The width of the round rectangle.
height The height of the round rectangle.
cornerWidth The width of the corner arc.
cornerHeight The height of the corner arc.


Returns OK or error message.


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.


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.Destroy"; $img) ]
Set Field [ Drawing::Image; $png ]

See also

GMImage.DrawRectangle   -   GMImage.Edge

Feedback: Report problem or ask question.

MBS Realbasic Chart Plugins - Pfarrgemeinde St. Arnulf Nickenich