Repeat enum Null safety
How to paint any portions of a box not covered by an image.
An expansion on the concept of ImageRepeat, this enum defines three additional values whereby an image may be repeated by mirroring every other image tile to create a seamless texture from any image.
Constructors
- Repeat()
-
const
Values
- noRepeat → const Repeat
-
Leave uncovered portions of the box transparent.
const Repeat(0)
- repeat → const Repeat
-
Repeat the image in both the x and y directions until the box is filled.
const Repeat(1)
- repeatX → const Repeat
-
Repeat the image in the x direction until the box is filled horizontally.
const Repeat(2)
- repeatY → const Repeat
-
Repeat the image in the y direction until the box is filled vertically.
const Repeat(3)
- mirror → const Repeat
-
Mirror the image in both the x and y directions, alternating with every drawn image tile, until the box is filled.
This will render a seamlessly-tiling image, which may have noticeable "kaleidoscopic" edges depending on the provided image.
According to the situation, this may be desirable over the standard hard edge of a non-mirroring repeated image.
const Repeat(4)
- mirrorX → const Repeat
-
Mirror the image in the x direction, alternating with every drawn image tile, until the box is filled horizontally.
const Repeat(5)
- mirrorY → const Repeat
-
Mirror the image in the y direction, alternating with every drawn image tile until the box is filled vertically.
const Repeat(6)
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited