Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

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