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.

Inheritance

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

hashCode int
The hash code for this object.
read-only, inherited
index int
A numeric identifier for the enumerated value.
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

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

Constants

values → const List<Repeat>
A constant List of the values in this enum, in order of their declaration.
[noRepeat, repeat, repeatX, repeatY, mirror, mirrorX, mirrorY]