GMImage.DrawArc
---------------

Draws an arc.

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

MBS( "GMImage.DrawArc"; ImageRef; StartX; StartY; endX; endY; startDegrees; endDegrees ) 

**MBS**( **"GMImage.DrawArc";** /\* Draws an arc. \*/  
**$ImageRef**; /\* The image reference number.e.g. 1 \*/   
**$StartX**; /\* The X coordinate for start position. \*/   
**$StartY**; /\* The Y coordinate for start position. \*/   
**$endX**; /\* The X coordinate for end position. \*/   
**$endY**; /\* The Y coordinate for end position. \*/   
**$startDegrees**; /\* The start degree value. \*/   
**$endDegrees**) /\* The end degree value. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| ImageRef | The image reference number. | 1 |
| StartX | The X coordinate for start position. |  |
| StartY | The Y coordinate for start position. |  |
| endX | The X coordinate for end position. |  |
| endY | The Y coordinate for end position. |  |
| startDegrees | The start degree value. |  |
| endDegrees | The end degree value. |  |

### Result

Returns OK or error message.

### Description

Draws an arc.  
Draw an arc using the stroke color and based on the circle starting at coordinates startX,startY, and ending with coordinates endX,endY, and bounded by the rotational arc startDegrees,endDegrees.  
  
If you have an open path, the command is added there for later drawing with [GMImage.DrawPath](GMImageDrawPath.md).  
### Examples

Creates a new image with a round rectangle:

 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.DrawArc"; $img ; 50; 50; 250; 150; 0; 90) \]   
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.DrawCircle](GMImageDrawCircle.md)
- [GMImage.DrawLine](GMImageDrawLine.md)
- [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#5ScriptAnchor_)

### 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.Directory](GMImageDirectory.md) - [GMImage.DrawCircle](GMImageDrawCircle.md)

[HTML Version](GMImageDrawArc.shtml)