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: 12.2   12.3   12.4   12.5   13.0   13.1   13.2   13.3   13.4   13.5    Statistic    FMM    Blog  

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
MBS( "GMImage.FillPattern"; ImageRef; fillPatternRef )   More

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

Example Databases

This function checks for a license.

Created 18th August 2014, last changed 16th February 2023


GMImage.Extent - GMImage.FindColorInColumn

💬 Ask a question or report a problem