public createPattern(image as Object, repetition as String = "repeat") as ImagePattern
Creates a raster image pattern, capturing pixels when a shape is drawn.
| Parameter | Description |
|---|---|
image | RasterImage, BitmapImage, String path or FilePath. |
repetition | repeat, repeat-x, repeat-y or no-repeat. |
A pattern usable as fillStyle or strokeStyle.
pattern = painter.createPattern("checker.png", "repeat")