CanvasImagePattern class

Image pattern fill for canvas shapes.

This is similar to using createPattern(image, repetition) in the browser Canvas API. Browser builds load src, create a canvas pattern, and redraw the retained scene when the image is ready.

Constructors

CanvasImagePattern({required String src, CanvasPatternRepetition repetition = CanvasPatternRepetition.repeat, String? crossOrigin})
Creates an image pattern fill.
const
CanvasImagePattern.fromJson(Map<String, Object?> json)
Creates an image pattern from json.
factory

Properties

crossOrigin → String?
Optional browser CORS setting for the image.
final
hashCode → int
The hash code for this object.
no setterinherited
repetition → CanvasPatternRepetition
Pattern repeat behavior.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
src → String
Image URL used for the pattern.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
Converts this pattern to a JSON-friendly map.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited