SpriteBatch class

sprite atlas with an image and a set of rects and transforms

Constructors

SpriteBatch(Image atlas)

Properties

atlas Image
final
colors List<Color>
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
height int
read-only
rects List<Rect>
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
size Size
read-only
transforms List<RSTransform>
read / write
width int
read-only

Methods

add({Rect rect, double scale = 1.0, Offset anchor = Offset.zero, double rotation = 0, Offset offset = Offset.zero, Color color}) → void
addTransform({Rect rect, RSTransform transform, Color color}) → void
clear() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
render(Canvas canvas, {BlendMode blendMode, Rect cullRect, Paint paint}) → void
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited

Static Properties

defaultPaint Paint
final
defaultTransform RSTransform
final

Static Methods

withAsset(String imageName) Future<SpriteBatch>

Constants

defaultBlendMode → const BlendMode
BlendMode.srcOver
defaultColor → const Color
const Color(0x00000000)
defaultCullRect → const dynamic
null