ImageShader constructor
- Image image,
- TileMode tmx,
- TileMode tmy,
- Float64List matrix4
Creates an image-tiling shader. The first argument specifies the image to tile. The second and third arguments specify the TileMode for the x direction and y direction respectively. The fourth argument gives the matrix to apply to the effect. All the arguments are required and must not be null.
Implementation
@pragma('vm:entry-point')
ImageShader(Image image, TileMode tmx, TileMode tmy, Float64List matrix4) :
// ignore: unnecessary_null_comparison
assert(image != null), // image is checked on the engine side
assert(tmx != null), // ignore: unnecessary_null_comparison
assert(tmy != null), // ignore: unnecessary_null_comparison
assert(matrix4 != null), // ignore: unnecessary_null_comparison
super._() {
if (matrix4.length != 16)
throw ArgumentError('"matrix4" must have 16 entries.');
_constructor();
_initWithImage(image, tmx.index, tmy.index, matrix4);
}