TBLMatrix2D
2D matrix represents an affine transformation matrix that can be used to transform geometry and images.
Definition
Unit: Blend2D
Fields
Name | Description |
---|---|
M |
Properties
Name | Description |
---|---|
Kind | The matrix kind. |
M00 | Element [0, 0]. Contains X scaling. |
M01 | Element [0, 1]. Contains rotation and skewing. |
M10 | Element [1, 0]. Contains rotation and skewing. |
M11 | Element [1, 1]. Contains Y scaling. |
M20 | Element [2, 0]. Contains X translation. |
M21 | Element [2, 1]. Contains Y translation. |
Constructors
Name | Description |
---|---|
Create |
Operators
Name | Description |
---|---|
Equal | |
NotEqual |
Methods
Field Descriptions
M
var M: array [0..5] of Double
Type: array [0..5] of Double
Property Descriptions
Kind
The matrix kind.
property Kind: TBLTransformKind read GetKind
Type: TBLTransformKind
M00
Element [0, 0]. Contains X scaling.
property M00: Double read M[0] write M[0]
Type: Double
M01
Element [0, 1]. Contains rotation and skewing.
property M01: Double read M[1] write M[1]
Type: Double
M10
Element [1, 0]. Contains rotation and skewing.
property M10: Double read M[2] write M[2]
Type: Double
M11
Element [1, 1]. Contains Y scaling.
property M11: Double read M[3] write M[3]
Type: Double
M20
Element [2, 0]. Contains X translation.
property M20: Double read M[4] write M[4]
Type: Double
M21
Element [2, 1]. Contains Y translation.
property M21: Double read M[5] write M[5]
Type: Double
Constructor Descriptions
Create
constructor Create(const AM00, AM01, AM10, AM11, AM20, AM21: Double)
Parameters
AM00
: Double
AM01
: Double
AM10
: Double
AM11
: Double
AM20
: Double
AM21
: Double
Operator Descriptions
Equal(TBLMatrix2D, TBLMatrix2D)
class operator Equal(const ALeft, ARight: TBLMatrix2D): Boolean; inline; static
Parameters
ALeft
: TBLMatrix2D
ARight
: TBLMatrix2D
Returns
Boolean
NotEqual(TBLMatrix2D, TBLMatrix2D)
class operator NotEqual(const ALeft, ARight: TBLMatrix2D): Boolean; inline; static
Parameters
ALeft
: TBLMatrix2D
ARight
: TBLMatrix2D
Returns
Boolean
Method Descriptions
Determinant
Calculates the matrix determinant.
function Determinant: Double; inline
Returns
Double
Equals(TBLMatrix2D)
function Equals(const AOther: TBLMatrix2D): Boolean; inline
Parameters
AOther
: TBLMatrix2D
Returns
Boolean
Invert(TBLMatrix2D, TBLMatrix2D)
Inverts ASrc
matrix and stores the result in ADst
. Returns True if the matrix has been inverted successfully.
class function Invert(const ASrc: TBLMatrix2D; out ADst: TBLMatrix2D): Boolean; overload; inline; static
Parameters
ASrc
: TBLMatrix2D
ADst
: TBLMatrix2D
Returns
Boolean
Invert
Inverts the matrix. Returns True if the matrix has been inverted successfully.
function Invert: Boolean; overload; inline
Returns
Boolean
MakeIdentity
Creates a new matrix initialized to identity.
class function MakeIdentity: TBLMatrix2D; inline; static
Returns
MakeRotation(Double, TBLPoint)
class function MakeRotation(const AAngle: Double; const AOrigin: TBLPoint): TBLMatrix2D; overload; inline; static
Parameters
AAngle
: Double
AOrigin
: TBLPoint
Returns
MakeRotation(Double, Double, Double)
class function MakeRotation(const AAngle, AX, AY: Double): TBLMatrix2D; overload; inline; static
Parameters
AAngle
: Double
AX
: Double
AY
: Double
Returns
MakeRotation(Double)
Creates a new matrix initialized to rotation.
class function MakeRotation(const AAngle: Double): TBLMatrix2D; overload; inline; static
Parameters
AAngle
: Double
Returns
MakeScaling(TBLPointI)
class function MakeScaling(const AP: TBLPointI): TBLMatrix2D; overload; inline; static
Parameters
AP
: TBLPointI
Returns
MakeScaling(TBLPoint)
class function MakeScaling(const AP: TBLPoint): TBLMatrix2D; overload; inline; static
Parameters
AP
: TBLPoint
Returns
MakeScaling(Double, Double)
class function MakeScaling(const AX, AY: Double): TBLMatrix2D; overload; inline; static
Parameters
AX
: Double
AY
: Double
Returns
MakeScaling(Double)
Creates a new matrix initialized to scaling.
class function MakeScaling(const AXY: Double): TBLMatrix2D; overload; inline; static
Parameters
AXY
: Double
Returns
MakeSinCos(Double, Double, TBLPoint)
class function MakeSinCos(const ASin, ACos: Double; const AP: TBLPoint): TBLMatrix2D; overload; inline; static
Parameters
ASin
: Double
ACos
: Double
AP
: TBLPoint
Returns
MakeSinCos(Double, Double, Double, Double)
class function MakeSinCos(const ASin, ACos: Double; const ATX: Double = 0; const ATY: Double = 0): TBLMatrix2D; overload; inline; static
Parameters
ASin
: Double
ACos
: Double
ATX
: Double = 0
ATY
: Double = 0
Returns
MakeSkewing(TBLPoint)
class function MakeSkewing(const AOrigin: TBLPoint): TBLMatrix2D; overload; inline; static
Parameters
AOrigin
: TBLPoint
Returns
MakeSkewing(Double, Double)
Create a new skewing matrix.
class function MakeSkewing(const AX, AY: Double): TBLMatrix2D; overload; inline; static
Parameters
AX
: Double
AY
: Double
Returns
MakeTranslation(TBLPointI)
class function MakeTranslation(const AP: TBLPointI): TBLMatrix2D; overload; inline; static
Parameters
AP
: TBLPointI
Returns
MakeTranslation(TBLPoint)
class function MakeTranslation(const AP: TBLPoint): TBLMatrix2D; overload; inline; static
Parameters
AP
: TBLPoint
Returns
MakeTranslation(Double, Double)
Creates a new matrix initialized to translation.
class function MakeTranslation(const AX, AY: Double): TBLMatrix2D; overload; inline; static
Parameters
AX
: Double
AY
: Double
Returns
MapPoint(TBLPoint)
function MapPoint(const AP: TBLPoint): TBLPoint; overload; inline
Parameters
AP
: TBLPoint
Returns
MapPoint(Double, Double)
function MapPoint(const AX, AY: Double): TBLPoint; overload; inline
Parameters
AX
: Double
AY
: Double
Returns
MapVector(TBLPoint)
function MapVector(const AP: TBLPoint): TBLPoint; overload; inline
Parameters
AP
: TBLPoint
Returns
MapVector(Double, Double)
function MapVector(const AX, AY: Double): TBLPoint; overload; inline
Parameters
AX
: Double
AY
: Double
Returns
PostRotate(Double, TBLPointI)
procedure PostRotate(const AAngle: Double; const AP: TBLPointI); overload; inline
Parameters
AAngle
: Double
AP
: TBLPointI
PostRotate(Double, TBLPoint)
procedure PostRotate(const AAngle: Double; const AP: TBLPoint); overload; inline
Parameters
AAngle
: Double
AP
: TBLPoint
PostRotate(Double, Double, Double)
procedure PostRotate(const AAngle, AX, AY: Double); overload; inline
Parameters
AAngle
: Double
AX
: Double
AY
: Double
PostRotate(Double)
procedure PostRotate(const AAngle: Double); overload; inline
Parameters
AAngle
: Double
PostScale(TBLPointI)
procedure PostScale(const AP: TBLPointI); overload; inline
Parameters
AP
: TBLPointI
PostScale(TBLPoint)
procedure PostScale(const AP: TBLPoint); overload; inline
Parameters
AP
: TBLPoint
PostScale(Double, Double)
procedure PostScale(const AX, AY: Double); overload; inline
Parameters
AX
: Double
AY
: Double
PostScale(Double)
procedure PostScale(const AXY: Double); overload; inline
Parameters
AXY
: Double
PostSkew(TBLPoint)
procedure PostSkew(const AP: TBLPoint); overload; inline
Parameters
AP
: TBLPoint
PostSkew(Double, Double)
procedure PostSkew(const AX, AY: Double); overload; inline
Parameters
AX
: Double
AY
: Double
PostTransform(TBLMatrix2D)
procedure PostTransform(const AM: TBLMatrix2D); inline
Parameters
AM
: TBLMatrix2D
PostTranslate(TBLPointI)
procedure PostTranslate(const AP: TBLPointI); overload; inline
Parameters
AP
: TBLPointI
PostTranslate(TBLPoint)
procedure PostTranslate(const AP: TBLPoint); overload; inline
Parameters
AP
: TBLPoint
PostTranslate(Double, Double)
procedure PostTranslate(const AX, AY: Double); overload; inline
Parameters
AX
: Double
AY
: Double
Reset(Double, Double, Double, Double, Double, Double)
Resets matrix to [AM00, AM01, AM10, AM11, AM20, AM21]
.
procedure Reset(const AM00, AM01, AM10, AM11, AM20, AM21: Double); overload; inline
Parameters
AM00
: Double
AM01
: Double
AM10
: Double
AM11
: Double
AM20
: Double
AM21
: Double
Reset(TBLMatrix2D)
Resets matrix to AOther
(copy its content to this matrix).
procedure Reset(const AOther: TBLMatrix2D); overload; inline
Parameters
AOther
: TBLMatrix2D
Reset
Resets matrix to identity.
procedure Reset; overload; inline
ResetToRotation(Double, TBLPoint)
Resets matrix to rotation around a point p
.
procedure ResetToRotation(const AAngle: Double; const AOrigin: TBLPoint); overload; inline
Parameters
AAngle
: Double
AOrigin
: TBLPoint
ResetToRotation(Double, Double, Double)
Resets matrix to rotation around a point [X, Y]
.
procedure ResetToRotation(const AAngle, AX, AY: Double); overload; inline
Parameters
AAngle
: Double
AX
: Double
AY
: Double
ResetToRotation(Double)
Resets matrix to rotation.
procedure ResetToRotation(const AAngle: Double); overload; inline
Parameters
AAngle
: Double
ResetToScaling(TBLPointI)
Resets matrix to scaling.
procedure ResetToScaling(const AP: TBLPointI); overload; inline
Parameters
AP
: TBLPointI
ResetToScaling(TBLPoint)
Resets matrix to scaling.
procedure ResetToScaling(const AP: TBLPoint); overload; inline
Parameters
AP
: TBLPoint
ResetToScaling(Double, Double)
Resets matrix to scaling.
procedure ResetToScaling(const AX, AY: Double); overload; inline
Parameters
AX
: Double
AY
: Double
ResetToScaling(Double)
Resets matrix to scaling.
procedure ResetToScaling(const AXY: Double); overload; inline
Parameters
AXY
: Double
ResetToSinCos(Double, Double, TBLPoint)
Resets matrix to rotation specified by ASin
and ACos
and translation AP
.
procedure ResetToSinCos(const ASin, ACos: Double; const AP: TBLPoint); overload; inline
Parameters
ASin
: Double
ACos
: Double
AP
: TBLPoint
ResetToSinCos(Double, Double, Double, Double)
Resets matrix to rotation specified by ASin
and ACos
and optional translation ATX
and ATY
.
procedure ResetToSinCos(const ASin, ACos: Double; const ATX: Double = 0; const ATY: Double = 0); overload; inline
Parameters
ASin
: Double
ACos
: Double
ATX
: Double = 0
ATY
: Double = 0
ResetToSkewing(TBLPoint)
Resets matrix to skewing.
procedure ResetToSkewing(const AP: TBLPoint); overload; inline
Parameters
AP
: TBLPoint
ResetToSkewing(Double, Double)
Resets matrix to skewing.
procedure ResetToSkewing(const AX, AY: Double); overload; inline
Parameters
AX
: Double
AY
: Double
ResetToTranslation(TBLPointI)
Resets matrix to translation.
procedure ResetToTranslation(const AP: TBLPointI); overload; inline
Parameters
AP
: TBLPointI
ResetToTranslation(TBLPoint)
Resets matrix to translation.
procedure ResetToTranslation(const AP: TBLPoint); overload; inline
Parameters
AP
: TBLPoint
ResetToTranslation(Double, Double)
Resets matrix to translation.
procedure ResetToTranslation(const AX, AY: Double); overload; inline
Parameters
AX
: Double
AY
: Double
Rotate(Double, TBLPointI)
procedure Rotate(const AAngle: Double; const AP: TBLPointI); overload; inline
Parameters
AAngle
: Double
AP
: TBLPointI
Rotate(Double, TBLPoint)
procedure Rotate(const AAngle: Double; const AP: TBLPoint); overload; inline
Parameters
AAngle
: Double
AP
: TBLPoint
Rotate(Double, Double, Double)
procedure Rotate(const AAngle, AX, AY: Double); overload; inline
Parameters
AAngle
: Double
AX
: Double
AY
: Double
Rotate(Double)
procedure Rotate(const AAngle: Double); overload; inline
Parameters
AAngle
: Double
Scale(TBLPointI)
procedure Scale(const AP: TBLPointI); overload; inline
Parameters
AP
: TBLPointI
Scale(TBLPoint)
procedure Scale(const AP: TBLPoint); overload; inline
Parameters
AP
: TBLPoint
Scale(Double, Double)
procedure Scale(const AX, AY: Double); overload; inline
Parameters
AX
: Double
AY
: Double
Scale(Double)
procedure Scale(const AXY: Double); overload; inline
Parameters
AXY
: Double
Skew(TBLPoint)
procedure Skew(const AP: TBLPoint); overload; inline
Parameters
AP
: TBLPoint
Skew(Double, Double)
procedure Skew(const AX, AY: Double); overload; inline
Parameters
AX
: Double
AY
: Double
Transform(TBLMatrix2D)
procedure Transform(const AM: TBLMatrix2D); inline
Parameters
AM
: TBLMatrix2D
Translate(TBLPointI)
procedure Translate(const AP: TBLPointI); overload; inline
Parameters
AP
: TBLPointI
Translate(TBLPoint)
procedure Translate(const AP: TBLPoint); overload; inline
Parameters
AP
: TBLPoint
Translate(Double, Double)
procedure Translate(const AX, AY: Double); overload; inline
Parameters
AX
: Double
AY
: Double