Creates a new fill pattern.
The options for the fill pattern.
Creates a new fill pattern from a texture and optional repetition mode.
The texture to tile.
Optionalrepetition: PatternRepetitionHow the pattern should repeat.
Whether pattern coordinates are evaluated in local or global space.
The transform matrix applied to the pattern
Returns a unique key for this instance. This key is used for caching.
Unique key for the instance
Internal texture used to render the gradient
Destroys the fill pattern, releasing resources. This will also destroy the internal texture.
Sets the transform for the pattern
Optionaltransform: MatrixThe transform matrix to apply to the pattern. If not provided, the pattern will use the default transform.
A class that represents a fill pattern for use in Text and Graphics fills. It allows for textures to be used as patterns, with optional repetition modes.
Patterns default to
textureSpace: 'global', meaning tiles repeat continuously across world space and adjacent shapes share the same tiling grid. PasstextureSpace: 'local'to map a single tile to each shape's bounds instead.Example