Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
GMImage.TransformOrigin
Origin of coordinate system to use when annotating with text or drawing.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
GraphicsMagick | 2.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "GMImage.TransformOrigin"; ImageRef; X; Y ) More
Parameters
Parameter | Description | Example |
---|---|---|
ImageRef | The image reference number. | 1 |
X | The horizontal offset | 0 |
Y | The vertical offset | 0 |
Result
Returns "OK" on success.
Description
Origin of coordinate system to use when annotating with text or drawing.See GMImage.TransformReset to reset current transform.
Examples
Draw rectangle 45° rotated at specific coordinate:
# move origin
Set Variable [ $r ; Value: MBS( "GMImage.TransformOrigin"; $img; 50 + 125; 50 + 75 ) ]
# draw rectangle centered there
Set Variable [ $r ; Value: MBS("GMImage.DrawRectangle"; $img; -125; -75; 125; 75) // 250 x 150 ]
# rotate 45°
Set Variable [ $r ; Value: MBS( "GMImage.TransformRotation"; $img; 45 ) ]
# draw rectangle centered there
Set Variable [ $r ; Value: MBS("GMImage.DrawRectangle"; $img; -125; -75; 125; 75) // 250 x 150 ]
See also
- GMImage.DrawRectangle
- GMImage.Transform
- GMImage.TransformReset
- GMImage.TransformRotation
- GMImage.TransformScale
- GMImage.TransformSkewX
- GMImage.TransformSkewY
Blog Entries
This function checks for a license.
Created 18th August 2014, last changed 16th December 2020
