Esempio n. 1
0
 public void Translate(float offsetX, float offsetY, MatrixOrderX order)
 {
     if (order == MatrixOrderX.Prepend)
     {
         MatrixFP m = MatrixFP.Identity();
         m.Translate(SingleFP.FromFloat(offsetX), SingleFP.FromFloat(offsetY));
         m.Multiply(matrix);
         matrix = m;
     }
     else
     {
         matrix.Translate(SingleFP.FromFloat(offsetX), SingleFP.FromFloat(offsetY));
     }
 }
Esempio n. 2
0
 public void Shear(float shearX, float shearY, MatrixOrderX order)
 {
     if (order == MatrixOrderX.Prepend)
     {
         MatrixFP m = MatrixFP.Identity();
         m.RotateSkew(SingleFP.FromFloat(shearX), SingleFP.FromFloat(shearY));
         m.Multiply(matrix);
         matrix = m;
     }
     else
     {
         matrix.RotateSkew(SingleFP.FromFloat(shearX), SingleFP.FromFloat(shearY));
     }
 }
Esempio n. 3
0
 public void Scale(float scaleX, float scaleY, MatrixOrderX order)
 {
     if (order == MatrixOrderX.Prepend)
     {
         MatrixFP m = MatrixFP.Identity();
         m.Scale(SingleFP.FromFloat(scaleX), SingleFP.FromFloat(scaleY));
         m.Multiply(matrix);
         matrix = m;
     }
     else
     {
         matrix.Scale(SingleFP.FromFloat(scaleX), SingleFP.FromFloat(scaleY));
     }
 }
Esempio n. 4
0
 public void Rotate(float angle, MatrixOrderX order)
 {
     if (order == MatrixOrderX.Prepend)
     {
         MatrixFP m = MatrixFP.Identity();
         m.Rotate(MathFP.ToRadians(SingleFP.FromFloat(angle)));
         m.Multiply(matrix);
         matrix = m;
     }
     else
     {
         matrix.Rotate(MathFP.ToRadians(SingleFP.FromFloat(angle)));
     }
 }
Esempio n. 5
0
 public void RotateAt(float angle, PointF point, MatrixOrderX order)
 {
     if (order == MatrixOrderX.Prepend)
     {
         MatrixFP m = MatrixFP.Identity();
         m.Translate(SingleFP.FromFloat(-point.X), SingleFP.FromFloat(-point.Y));
         m.Rotate(MathFP.ToRadians(SingleFP.FromFloat(angle)));
         m.Multiply(matrix);
         m.Translate(SingleFP.FromFloat(point.X), SingleFP.FromFloat(point.Y));
         matrix = m;
     }
     else
     {
         matrix.Translate(SingleFP.FromFloat(-point.X), SingleFP.FromFloat(-point.Y));
         matrix.Rotate(MathFP.ToRadians(SingleFP.FromFloat(angle)));
         matrix.Translate(SingleFP.FromFloat(point.X), SingleFP.FromFloat(point.Y));
     }
 }
Esempio n. 6
0
 internal MatrixX(MatrixFP m)
 {
     matrix = m == null?MatrixFP.Identity() : new MatrixFP(m);
 }
Esempio n. 7
0
 public MatrixX()
 {
     matrix = MatrixFP.Identity();
 }
Esempio n. 8
0
 public void Reset()
 {
     matrix = MatrixFP.Identity();
 }