PdfMatrix class
A 2D affine transform in PDF convention: row vectors, so a point maps as
x' = a·x + c·y + e, y' = b·x + d·y + f (ISO 32000-1 §8.3.3).
Lives in pdf_cos (the lowest layer) so every package - COS-level
geometry, the page/annotation model, the graphics interpreter, and the
Flutter renderer - shares one representation of [a b c d e f] instead of
re-implementing the multiply/apply/bounds math over record tuples, six
locals, or List<double>.
Constructors
- PdfMatrix(double a, double b, double c, double d, double e, double f)
-
const
-
PdfMatrix.row(List<
double> ? values) -
Reads an
[a b c d e f]row (as stored in a /Matrix array). Missing or short input falls back to identity; a diagonal defaults to 1, an off-diagonal or translation to 0.factory - PdfMatrix.scaled(double sx, double sy)
-
const
- PdfMatrix.translation(double dx, double dy)
-
const
Properties
- a → double
-
final
- b → double
-
final
- c → double
-
final
- d → double
-
final
- e → double
-
final
- f → double
-
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scaleFactor → double
-
Average scale factor: how much this transform magnifies lengths.
no setter
Methods
-
apply(
double x, double y) → (double, double) -
Maps the point (
x,y) through this transform, as a record. -
concat(
PdfMatrix after) → PdfMatrix -
Returns the transform that applies
thisfirst, thenafter- the matrix productthis × afterin row-vector convention. -
inverted(
) → PdfMatrix? - The inverse transform, or null when this matrix is degenerate.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toList(
) → List< double> -
The transform as an
[a b c d e f]row, ready to serialize into a /Matrix array. -
toString(
) → String -
A string representation of this object.
override
-
transformX(
double x, double y) → double -
transformY(
double x, double y) → double
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override