Foxit PDF SDK
foxit.common.fxcrt.Matrix2D类 参考

继承自 SystemIDisposable .

Public 成员函数

 Matrix2D ()
 构造一个单位变换矩阵。
 
 Matrix2D (float a1, float b1, float c1, float d1, float e1, float f1)
 用六个输入系数构造矩阵。 更多...
 
void Concat (float a, float b, float c, float d, float e, float f, bool bPrepended)
 与另一个矩阵连接。 更多...
 
void Concat (Matrix2D m, bool bPrepended)
 与另一个矩阵连接。 更多...
 
void ConcatInverse (Matrix2D m, bool bPrepended)
 连接另一个矩阵的逆矩阵。 更多...
 
void Copy (Matrix2D m)
 从另一个矩阵复制系数。 更多...
 
float GetUnitArea ()
 获取由两个单位向量组成的平行四边形的面积。 更多...
 
RectF GetUnitRect ()
 获取由两个单位向量组成的平行四边形的边界矩形。 更多...
 
float GetXUnit ()
 获取X方向的单位大小。 更多...
 
float GetYUnit ()
 获取Y方向的单位大小。 更多...
 
bool Is90Rotated ()
 此矩阵是否包含90度或-90度的旋转。 更多...
 
bool IsIdentity ()
 确定矩阵是否为单位变换。 更多...
 
bool IsInvertible ()
 确定矩阵是否可逆。 更多...
 
bool IsScaled ()
 此矩阵是否仅包含缩放(或平移)。没有旋转。 更多...
 
void MatchRect (RectF dest, RectF src)
 获取将源矩形变换到目标矩形的矩阵。 更多...
 
void Reset ()
 重置当前矩阵。 更多...
 
void Rotate (float fRadian, bool bPrepended)
 旋转矩阵。 更多...
 
void RotateAt (float fRadian, float x, float y, bool bPrepended)
 在指定位置旋转矩阵。 更多...
 
void Scale (float sx, float sy, bool bPrepended)
 缩放矩阵。 更多...
 
void Set (float a, float b, float c, float d, float e, float f)
 更改矩阵中的系数。 更多...
 
void Set (float[] n)
 更改矩阵中的系数。 更多...
 
void SetIdentity ()
 将矩阵设置为单位变换矩阵。 更多...
 
void SetReverse (Matrix2D m)
 将另一个矩阵的逆矩阵的系数设置到此矩阵中。 更多...
 
void Shear (float fAlphaRadian, float fBetaRadian, bool bPrepended)
 剪切矩阵。 更多...
 
float TransformDistance (float dx, float dy)
 变换由X和Y值指定的距离。 更多...
 
int TransformDistance (int dx, int dy)
 变换由X和Y值指定的距离。 更多...
 
float TransformDistance (float distance)
 变换距离。 更多...
 
void TransformPoint (ref float x, ref float y)
 变换由X和Y值指定的点。 更多...
 
void TransformPoint (ref int x, ref int y)
 变换由X和Y值指定的点。 更多...
 
void TransformRect (RectF rect)
 变换一个矩形并返回边界矩形。 结果矩形总是标准化的:left <= right,且 bottom <= top。 更多...
 
void TransformRect (RectI rect)
 变换一个矩形并返回边界矩形。 结果矩形总是标准化的:left <= right,且 bottom <= top。 更多...
 
float TransformXDistance (float dx)
 变换X距离。 更多...
 
int TransformXDistance (int dx)
 变换X距离。 更多...
 
float TransformYDistance (float dy)
 变换Y距离。 更多...
 
int TransformYDistance (int dy)
 变换Y距离。 更多...
 
void Translate (float x, float y, bool bPrepended)
 平移矩阵。 更多...
 
void TranslateI (int x, int y, bool bPrepended)
 平移矩阵。使用整数值。 更多...
 

属性

float a [get, set]
 系数a。
 
float b [get, set]
 系数b。
 
float c [get, set]
 系数c。
 
float d [get, set]
 系数d。
 
float e [get, set]
 系数e。
 
float f [get, set]
 系数f。
 

详细描述

仿射(线性)变换矩阵。

它定义了六个系数:a、b、c、d、e、f。 变换方程为: dest_x = a * src_x + c * src_y + e; dest_y = b * src_x + d * src_y + f;

构造及析构函数说明

◆ Matrix2D()

foxit.common.fxcrt.Matrix2D.Matrix2D ( float  a1,
float  b1,
float  c1,
float  d1,
float  e1,
float  f1 
)
inline

用六个输入系数构造矩阵。

参数
[in]a1输入系数a。
[in]b1输入系数b。
[in]c1输入系数c。
[in]d1输入系数d。
[in]e1输入系数e。
[in]f1输入系数f。

成员函数说明

◆ Concat() [1/2]

void foxit.common.fxcrt.Matrix2D.Concat ( float  a,
float  b,
float  c,
float  d,
float  e,
float  f,
bool  bPrepended 
)
inline

与另一个矩阵连接。

参数
[in]a输入矩阵的系数a。
[in]b输入矩阵的系数b。
[in]c输入矩阵的系数c。
[in]d输入矩阵的系数d。
[in]e输入矩阵的系数e。
[in]f输入矩阵的系数f。
[in]bPrepended如果为 true,连接矩阵在左侧相乘,否则在右侧相乘。
返回
无。

◆ Concat() [2/2]

void foxit.common.fxcrt.Matrix2D.Concat ( Matrix2D  m,
bool  bPrepended 
)
inline

与另一个矩阵连接。

参数
[in]m输入的矩阵。
[in]bPrepended如果为 true,连接矩阵在左侧相乘,否则在右侧相乘。
返回
无。

◆ ConcatInverse()

void foxit.common.fxcrt.Matrix2D.ConcatInverse ( Matrix2D  m,
bool  bPrepended 
)
inline

连接另一个矩阵的逆矩阵。

参数
[in]m输入的矩阵。
[in]bPrepended如果为 true,连接矩阵在左侧相乘,否则在右侧相乘。
返回
无。

◆ Copy()

void foxit.common.fxcrt.Matrix2D.Copy ( Matrix2D  m)
inline

从另一个矩阵复制系数。

参数
[in]m输入的矩阵。
返回
无。

◆ GetUnitArea()

float foxit.common.fxcrt.Matrix2D.GetUnitArea ( )
inline

获取由两个单位向量组成的平行四边形的面积。

返回
由两个单位向量组成的平行四边形的面积。

◆ GetUnitRect()

RectF foxit.common.fxcrt.Matrix2D.GetUnitRect ( )
inline

获取由两个单位向量组成的平行四边形的边界矩形。

返回
单位矩形。

◆ GetXUnit()

float foxit.common.fxcrt.Matrix2D.GetXUnit ( )
inline

获取X方向的单位大小。

返回
X方向的单位大小。

◆ GetYUnit()

float foxit.common.fxcrt.Matrix2D.GetYUnit ( )
inline

获取Y方向的单位大小。

返回
Y方向的单位大小。

◆ Is90Rotated()

bool foxit.common.fxcrt.Matrix2D.Is90Rotated ( )
inline

此矩阵是否包含90度或-90度的旋转。

返回
true表示当前矩阵包含90度或-90度的旋转,false表示不包含。

◆ IsIdentity()

bool foxit.common.fxcrt.Matrix2D.IsIdentity ( )
inline

确定矩阵是否为单位变换。

返回
true表示当前矩阵是单位矩阵,false表示不是。

◆ IsInvertible()

bool foxit.common.fxcrt.Matrix2D.IsInvertible ( )
inline

确定矩阵是否可逆。

返回
true表示当前矩阵可逆,false表示不可逆。

◆ IsScaled()

bool foxit.common.fxcrt.Matrix2D.IsScaled ( )
inline

此矩阵是否仅包含缩放(或平移)。没有旋转。

返回
true表示当前矩阵仅包含缩放(或平移),false表示不是。

◆ MatchRect()

void foxit.common.fxcrt.Matrix2D.MatchRect ( RectF  dest,
RectF  src 
)
inline

获取将源矩形变换到目标矩形的矩阵。

参数
[in]dest目标矩形。
[in]src源矩形。
返回
无。

◆ Reset()

void foxit.common.fxcrt.Matrix2D.Reset ( )
inline

重置当前矩阵。

返回
无。

◆ Rotate()

void foxit.common.fxcrt.Matrix2D.Rotate ( float  fRadian,
bool  bPrepended 
)
inline

旋转矩阵。

参数
[in]fRadian以弧度为单位的旋转角度。
[in]bPrepended如果为 true,旋转矩阵在左侧相乘,否则在右侧相乘。
返回
无。

◆ RotateAt()

void foxit.common.fxcrt.Matrix2D.RotateAt ( float  fRadian,
float  x,
float  y,
bool  bPrepended 
)
inline

在指定位置旋转矩阵。

参数
[in]fRadian以弧度为单位的旋转角度。
[in]x旋转的X坐标。
[in]y旋转的Y坐标。
[in]bPrepended如果为 true,旋转矩阵在左侧相乘,否则在右侧相乘。
返回
无。

◆ Scale()

void foxit.common.fxcrt.Matrix2D.Scale ( float  sx,
float  sy,
bool  bPrepended 
)
inline

缩放矩阵。

参数
[in]sxX方向的缩放系数。
[in]syY方向的缩放系数。
[in]bPrepended如果为 true,缩放矩阵在左侧相乘,否则在右侧相乘。
返回
无。

◆ Set() [1/2]

void foxit.common.fxcrt.Matrix2D.Set ( float  a,
float  b,
float  c,
float  d,
float  e,
float  f 
)
inline

更改矩阵中的系数。

参数
[in]a输入系数a。
[in]b输入系数b。
[in]c输入系数c。
[in]d输入系数d。
[in]e输入系数e。
[in]f输入系数f。
返回
无。

◆ Set() [2/2]

void foxit.common.fxcrt.Matrix2D.Set ( float []  n)
inline

更改矩阵中的系数。

参数
[in]n输入的系数数组。
返回
无。

◆ SetIdentity()

void foxit.common.fxcrt.Matrix2D.SetIdentity ( )
inline

将矩阵设置为单位变换矩阵。

返回
无。

◆ SetReverse()

void foxit.common.fxcrt.Matrix2D.SetReverse ( Matrix2D  m)
inline

将另一个矩阵的逆矩阵的系数设置到此矩阵中。

参数
[in]m输入的矩阵。
返回
无。

◆ Shear()

void foxit.common.fxcrt.Matrix2D.Shear ( float  fAlphaRadian,
float  fBetaRadian,
bool  bPrepended 
)
inline

剪切矩阵。

参数
[in]fAlphaRadianX轴的剪切角度。
[in]fBetaRadianY轴的剪切角度。
[in]bPrepended如果为 true,剪切矩阵在左侧相乘,否则在右侧相乘。
返回
无。

◆ TransformDistance() [1/3]

float foxit.common.fxcrt.Matrix2D.TransformDistance ( float  dx,
float  dy 
)
inline

变换由X和Y值指定的距离。

参数
[in]dx输入的X值。
[in]dy输入的Y值。
返回
变换后的距离。

◆ TransformDistance() [2/3]

int foxit.common.fxcrt.Matrix2D.TransformDistance ( int  dx,
int  dy 
)
inline

变换由X和Y值指定的距离。

参数
[in]dx输入的X值。
[in]dy输入的Y值。
返回
变换后的距离。

◆ TransformDistance() [3/3]

float foxit.common.fxcrt.Matrix2D.TransformDistance ( float  distance)
inline

变换距离。

参数
[in]distance输入的距离。
返回
变换后的距离。

◆ TransformPoint() [1/2]

void foxit.common.fxcrt.Matrix2D.TransformPoint ( ref float  x,
ref float  y 
)
inline

变换由X和Y值指定的点。

参数
[in,out]x点的输入X坐标,并接收输出的变换后X坐标。
[in,out]y点的输入Y坐标,并接收输出的变换后Y坐标。
返回
无。

◆ TransformPoint() [2/2]

void foxit.common.fxcrt.Matrix2D.TransformPoint ( ref int  x,
ref int  y 
)
inline

变换由X和Y值指定的点。

参数
[in,out]x点的输入X坐标,并接收输出的变换后X坐标。
[in,out]y点的输入Y坐标,并接收输出的变换后Y坐标。
返回
无。

◆ TransformRect() [1/2]

void foxit.common.fxcrt.Matrix2D.TransformRect ( RectF  rect)
inline

变换一个矩形并返回边界矩形。 结果矩形总是标准化的:left <= right,且 bottom <= top。

参数
[in,out]rect输入的矩形,并接收输出的变换并标准化后的矩形。
返回
无。

◆ TransformRect() [2/2]

void foxit.common.fxcrt.Matrix2D.TransformRect ( RectI  rect)
inline

变换一个矩形并返回边界矩形。 结果矩形总是标准化的:left <= right,且 bottom <= top。

参数
[in,out]rect输入的矩形,并接收输出的变换并标准化后的矩形。
返回
无。

◆ TransformXDistance() [1/2]

float foxit.common.fxcrt.Matrix2D.TransformXDistance ( float  dx)
inline

变换X距离。

参数
[in]dx输入的X距离。
返回
变换后的距离。

◆ TransformXDistance() [2/2]

int foxit.common.fxcrt.Matrix2D.TransformXDistance ( int  dx)
inline

变换X距离。

参数
[in]dx输入的X距离。
返回
变换后的距离。

◆ TransformYDistance() [1/2]

float foxit.common.fxcrt.Matrix2D.TransformYDistance ( float  dy)
inline

变换Y距离。

参数
[in]dy输入的Y距离。
返回
变换后的距离。

◆ TransformYDistance() [2/2]

int foxit.common.fxcrt.Matrix2D.TransformYDistance ( int  dy)
inline

变换Y距离。

参数
[in]dy输入的Y距离。
返回
变换后的距离。

◆ Translate()

void foxit.common.fxcrt.Matrix2D.Translate ( float  x,
float  y,
bool  bPrepended 
)
inline

平移矩阵。

参数
[in]xX方向的偏移值。
[in]yY方向的偏移值。
[in]bPrepended如果为 true,平移矩阵在左侧相乘,否则在右侧相乘。
返回
无。

◆ TranslateI()

void foxit.common.fxcrt.Matrix2D.TranslateI ( int  x,
int  y,
bool  bPrepended 
)
inline

平移矩阵。使用整数值。

参数
[in]xX方向的偏移整数值。
[in]yY方向的偏移整数值。
[in]bPrepended如果为 true,平移矩阵在左侧相乘,否则在右侧相乘。
返回
无。