PerspectiveTransform class
A representation of a perspective transformation, that can be applied to single points. Common linear transformation operations (such as inversion and comCornerPoint) are also supported.
Constructors
-
PerspectiveTransform(List<
double> elements) - Creates a PerspectiveTransform from a list of 9 elements
-
PerspectiveTransform.fromQuadrilaterals(List<
CornerPoint> originVertices, List<CornerPoint> destinationVertices) -
Creates a PerspectiveTransform that transforms a given quadrilateral
into another given quadrilateral, expressed as a list of its vertices.
factory
-
PerspectiveTransform.fromTransformedSquare(List<
CornerPoint> vertices) -
Creates a PerspectiveTransform that transforms a 1x1 square into the
given quadrilateral, expressed as a list of its vertices.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true, thetoStringmethod will be overridden to output this instance'sprops.no setterinherited
Methods
-
apply(
CornerPoint point) → CornerPoint -
Applies this transformation to a given
pointand returns the transformed point. -
compose(
PerspectiveTransform other) → PerspectiveTransform -
Creates a PerspectiveTransform that is the comCornerPoint of this
transformation and a given
othertransformation. -
inverse(
) → PerspectiveTransform - Creates a PerspectiveTransform that is the inverse of this
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
to3DPerspectiveMatrix(
) → Float64List - Compute an equivalent 3D perspective matrix (4x4) that can be used to transform a canvas or as argument for the Transform widget in Flutter.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited