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.DrawLine
Draws a line.
| 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 |
| startX | The start X position. | |
| startY | The start Y position. | |
| endX | The end X position. | |
| endY | The end Y position. |
Result
Returns OK or error message.
Description
Draws a line.Draw a line using stroke color and thickness using starting and ending coordinates.
If you have an open path, the command is added there for later drawing with GMImage.DrawPath.
Examples
Create an image with a line:
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.DrawLine"; $img; 50; 50; 250; 150) ]
Set Variable [ $png; Wert:MBS("GMImage.WriteToPNGContainer"; $img; "test.png") ]
Set Variable [ $r; Wert:MBS("GMImage.Release"; $img) ]
Set Field [ Drawing::Image; $png ]
Draw a line from pos to pos2 on column x:
MBS( "GMImage.DrawLine"; $img; $x; $pos; $x; $pos2 )
See also
- GMImage.DrawArc
- GMImage.DrawCircle
- GMImage.DrawPath
- GMImage.New
- GMImage.Release
- GMImage.SetFillColor
- GMImage.SetLineWidth
- GMImage.SetStrokeAntiAlias
- GMImage.SetStrokeColor
- GMImage.WriteToPNGContainer
Example Databases
Created 18th August 2014, last changed 21st December 2018
GMImage.DrawEllipse - GMImage.DrawPath
Feedback: Report problem or ask question.
Links
MBS Xojo PDF Plugins