Affine matrix, used to represent scale, translate and other
transformations applied to e.g. an SVG node. Attaching an
affine matrix to a node is equivalent to calling dart:ui
's
Canvas.transform
method.
- Implementers
Constructors
-
Affine.fromCompact(List<
double> storage, int offset) -
Create a new immutable matrix as a view on underlying storage with an
offset. The first two rows are taken from storage, in row major order;
the final row of "0 0 1" is implicit. The storage must have a length
of at least offset + 6. The caller must ensure that the underlying list
is not changed.
factory
Properties
- forCanvas → Float64List
-
Give the 4x4 column-major matrix that Canvas wants
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- toKey → Affine
-
Give an immutable key that can be used to find equivalent
transformation matrices using ==.
no setter
- toMutable → MutableAffine
-
Give a mutable version of this matrix, by making a copy if necessary.
no setter
Methods
-
copyIntoCompact(
List< double> storage, [int offset = 0]) → void - Copy this affine into the compact format, as described in Affine.fromCompact.
-
get(
int row, int col) → double -
Get the element at
row
,col
-
mutableCopy(
) → MutableAffine - Give a copy of this matrix that is mutable.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
-
transformed(
Point< double> p) → Point<double> - Return a point transformed by this matrix.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override