17 class PODOFO_API Matrix final
20 static Matrix Identity;
26 Matrix(
double a,
double b,
double c,
double d,
double e,
double f);
29 static Matrix FromArray(
const double arr[6]);
30 static Matrix FromArray(
const PdfArray& arr);
31 static Matrix CreateTranslation(
const Vector2& tx);
32 static Matrix CreateScale(
const Vector2& scale);
33 static Matrix CreateRotation(
double teta);
34 static Matrix CreateRotation(
const Vector2& center,
double teta);
38 Matrix& Translate(
const Vector2& tx);
41 Matrix Translated(
const Vector2& tx)
const;
46 template <AlgebraicTrait trait>
49 return MatrixTraits<trait>::Get(m_mat);
52 template <AlgebraicTrait trait>
53 void Set(
double value)
55 MatrixTraits<trait>::Set(m_mat, value);
59 template <AlgebraicTrait trait>
60 Matrix& Apply(
double value)
62 MatrixTraits<trait>::Apply(m_mat, value);
67 Matrix operator*(
const Matrix& m)
const;
70 Matrix GetScalingRotation()
const;
71 Matrix GetRotation()
const;
72 Vector2 GetScaleVector()
const;
73 Vector2 GetTranslationVector()
const;
74 void ToArray(
double arr[6])
const;
75 void ToArray(PdfArray& arr)
const;
76 PdfArray ToArray()
const;
79 Matrix(
const Matrix&) =
default;
80 Matrix& operator=(
const Matrix&) =
default;
81 bool operator==(
const Matrix& m)
const;
82 bool operator!=(
const Matrix& m)
const;
85 const double& operator[](
unsigned idx)
const;
88 Matrix(
const double arr[6]);
SPDX-FileCopyrightText: (C) 2022 Francesco Pretto ceztko@gmail.com SPDX-License-Identifier: LGPL-2....
Definition basetypes.h:16