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.SetStrokeDashArray

Specify the pattern of dashes and gaps used to stroke paths.

Component Version macOS Windows Linux Server iOS SDK
GraphicsMagick 4.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "GMImage.SetStrokeDashArray"; ImageRef; Pattern )   More

Parameters

Parameter Description Example
ImageRef The image reference number. 1
Pattern The list of pattern numbers. can be separated by space or newline. "5 3 2"

Result

Returns OK or error.

Description

Specify the pattern of dashes and gaps used to stroke paths.
The strokeDashArray represents an array of numbers that specify the lengths of alternating dashes and gaps in pixels. If an odd number of values is provided, then the list of values is repeated to yield an even number of values. A typical strokeDashArray array might contain the members 5 3 2.

Examples

Set a dash line pattern:

MBS( "GMImage.SetStrokeDashArray"; $ImageRef; "5 3 2" )

See also

Blog Entries

This function checks for a license.

Created 18th August 2014, last changed 28th May 2021


GMImage.SetStrokeColor - GMImage.SetStrokeDashOffset

💬 Ask a question or report a problem