Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
GMImage.DrawEllipse
Draw an ellipse.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
GraphicsMagick | 3.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "GMImage.DrawEllipse"; ImageRef; originX; originY; radiusX; radiusY; arcStart; arcEnd ) More
Parameters
Parameter | Description | Example |
---|---|---|
ImageRef | The image reference number. | 1 |
originX | The X coordinate for origin position. | |
originY | The Y coordinate for origin position. | |
radiusX | The radius. | |
radiusY | The radius. | |
arcStart | The start degree value. | |
arcEnd | The end degree value. |
Result
Returns OK or error message.
Description
Draw an ellipse.Draw an ellipse using the stroke color and thickness, specified origin, x & y radius, as well as specified start and end of arc in degrees. 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
Draws an ellipse in a new image:
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.DrawEllipse"; $img; 150; 100; 80; 60; 0; 360) ]
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
- GMImage.DrawPath
- GMImage.New
- GMImage.Release
- GMImage.SetFillColor
- GMImage.SetLineWidth
- GMImage.SetStrokeColor
- GMImage.WriteToPNGContainer
Example Databases
Blog Entries
This function checks for a license.
Created 18th August 2014, last changed 21st December 2018