GMImage.DrawEllipse
-------------------

Draw an ellipse.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [GraphicsMagick](component_GraphicsMagick.md) | [3.0](newinversion30.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "GMImage.DrawEllipse"; ImageRef; originX; originY; radiusX; radiusY; arcStart; arcEnd ) 

**MBS**( **"GMImage.DrawEllipse";** /\* Draw an ellipse. \*/  
**$ImageRef**; /\* The image reference number.e.g. 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. \*/ 

### 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 &amp; 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](GMImageDrawPath.md).  
### Examples

Draws an ellipse in a new image:

 Set Variable \[ $img ; Value:MBS ("[GMImage.New](GMImageNew.md)"; "300x200"; "RGB 1 1 1") \]  
Set Variable \[ $r ; Value:MBS ("[GMImage.SetStrokeColor](GMImageSetStrokeColor.md)"; $img ; "RGB 1 0 0") \]   
Set Variable \[ $r ; Value:MBS ("[GMImage.SetFillColor](GMImageSetFillColor.md)"; $img ; "RGB 0 0 1") \]  
Set Variable \[ $r ; Value:MBS ("[GMImage.SetLineWidth](GMImageSetLineWidth.md)"; $img ; 5) \]  
Set Variable \[ $r ; Value:MBS ("GMImage.DrawEllipse"; $img ; 150; 100; 80; 60; 0; 360) \]   
Set Variable \[ $png ; Value:MBS ("[GMImage.WriteToPNGContainer](GMImageWriteToPNGContainer.md)"; $img ; "test.png") \]   
Set Variable \[ $r ; Value:MBS ("[GMImage.Release](GMImageRelease.md)"; $img ) \]  
Set Field \[ Drawing::Image ; $png \]  
### See also

- [GMImage.DrawPath](GMImageDrawPath.md)
- [GMImage.New](GMImageNew.md)
- [GMImage.Release](GMImageRelease.md)
- [GMImage.SetFillColor](GMImageSetFillColor.md)
- [GMImage.SetLineWidth](GMImageSetLineWidth.md)
- [GMImage.SetStrokeColor](GMImageSetStrokeColor.md)
- [GMImage.WriteToPNGContainer](GMImageWriteToPNGContainer.md)

### Example Databases

- [GraphicsMagick/Drawing](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/GraphicsMagick/Drawing.shtml#4ScriptAnchor_)

### Blog Entries

- [GraphicsMagick in FileMaker, part 20](https://www.mbsplugins.de/archive/2022-12-20/GraphicsMagick_in_FileMaker_pa/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 4th September 2025

  
[GMImage.DrawCircle](GMImageDrawCircle.md) - [GMImage.DrawLine](GMImageDrawLine.md)

[HTML Version](GMImageDrawEllipse.shtml)