Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
GMImage.FillPattern
Sets the pattern to use while filling drawn objects.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
GraphicsMagick | 2.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameters
Parameter | Description | Example |
---|---|---|
ImageRef | The image reference number. | 1 |
fillPatternRef | The image reference number. | 2 |
Result
Returns "OK" on success.
Description
Sets the pattern to use while filling drawn objects.Examples
Use one picture as pattern to draw round rectangle:
# Load big picture
Set Variable [ $BigImageRef ; Value: MBS("GMImage.NewFromContainer"; Combine Pictures::BigImage) ]
# load pattern picture
Set Variable [ $SmallImageRef ; Value: MBS("GMImage.NewFromContainer"; Combine Pictures::SmallImage) ]
# Draw a rectangle using small image as pattern
Set Variable [ $Error ; Value: MBS( "GMImage.FillPattern"; $BigImageRef; $SmallImageRef) ]
Set Variable [ $Error ; Value: MBS( "GMImage.DrawRoundRectangle"; $BigImageRef; 100; 100; 300; 300; 20; 20) ]
# Write to container and free references
Set Field [ Combine Pictures::Result ; MBS( "GMImage.WriteToPNGContainer"; $BigImageRef ) ]
Set Variable [ $Error ; Value: MBS("GMImage.Free";$BigImageRef) ]
Set Variable [ $Error ; Value: MBS("GMImage.Free";$SmallImageRef) ]
See also
- GMImage.DrawRoundRectangle
- GMImage.Free
- GMImage.New
- GMImage.NewFromContainer
- GMImage.WriteToPNGContainer
Example Databases
This function checks for a license.
Created 18th August 2014, last changed 16th February 2023