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.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
GMImage.DrawCircle
Draws a circle.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| GraphicsMagick | 3.0 | Yes | Yes | Yes | Yes | Yes |
Parameters
| Parameter | Description | Example |
|---|---|---|
| ImageRef | The image reference number. | 1 |
| originX | The X coordinate for start position. | |
| originY | The Y coordinate for start position. | |
| perimX | The perimeter width. | |
| perimY | The perimeter height. |
Result
Returns OK or error message.
Description
Draws a circle.Draw a circle using the stroke color and thickness using specified origin and perimeter coordinates. If a fill color is specified, then the object is filled.
PerimX/PerimY define a point where the circle goes through, so put it a radius away from the origin. e.g. PerimX is originX + radius while PerimY is originY.
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 circle 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.DrawCircle"; $img; 150; 100; 100; 100) ]
Set Variable [ $png; Wert:MBS("GMImage.WriteToPNGContainer"; $img; "test.png") ]
Set Variable [ $r; Wert:MBS("GMImage.Release"; $img) ]
Set Field [ Drawing::Image; $png ]
Draws a cirlce in a rectangle in a circle:
Set Variable [$img; Value:MBS( "GMImage.New"; "100x100"; "white" )]
Set Variable [$r; Value:MBS( "GMImage.SetFillColor"; $img; "RGB 1 0 0" )]
Set Variable [$r; Value:MBS( "GMImage.SetStrokeColor"; $img; "RGB 0 0 1" )]
Set Variable [$r; Value:MBS( "GMImage.DrawCircle"; $img; 50; 50; 50; 90 )]
Set Variable [$r; Value:MBS( "GMImage.DrawRectangle"; $img; 22; 22; 100-22; 100-22 )]
Set Variable [$r; Value:MBS( "GMImage.DrawCircle"; $img; 50; 50; 50; 100-22 )]
Set Field [test::test; MBS( "GMImage.WriteToPNGContainer"; $img; "test.png" )]
Set Variable [$r; Value:MBS( "GMImage.Release"; $img)]
Draw a circle at x/y with w as radius:
MBS( "GMImage.DrawCircle"; $image ; $x; $y; $x+$w ; $y)
See also
- GMImage.CopyChannel
- GMImage.DrawArc
- GMImage.DrawLine
- GMImage.DrawPath
- GMImage.DrawRectangle
- GMImage.New
- GMImage.Release
- GMImage.SetFillColor
- GMImage.SetStrokeColor
- GMImage.WriteToPNGContainer
Example Databases
- DynaPDF/Click Points
- GraphicsMagick/Clip Image
- GraphicsMagick/Drawing
- GraphicsMagick/GraphicsMagick Path Drawing
Blog Entries
FileMaker Magazin
Created 18th August 2014, last changed 7th May 2020
GMImage.DrawArc - GMImage.DrawEllipse
Feedback: Report problem or ask question.
Links
MBS Xojo Chart Plugins