PerspectiveTransform class

A representation of a perspective transformation, that can be applied to single points. Common linear transformation operations (such as inversion and composition) are also supported.

Constructors

PerspectiveTransform(List<double> elements)
PerspectiveTransform.fromQuadrilaterals(List<Position<num>> originVertices, List<Position<num>> destinationVertices)
Creates a PerspectiveTransform that transforms a given quadrilateral into another given quadrilateral, expressed as a list of its vertices.
factory
PerspectiveTransform.fromTransformedSquare(List<Position<num>> 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, the toString method will be overridden to output this instance's props.
no setterinherited

Methods

apply(Position<num> point) Position<double>
Applies this transformation to a given point and returns the transformed point.
compose(PerspectiveTransform other) PerspectiveTransform
Creates a PerspectiveTransform that is the composition of this transformation and a given other transformation.
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