Matrix Demo : Matrix « 2D Graphics « C# / C Sharp






Matrix Demo

Matrix Demo
 
/*
GDI+ Programming in C# and VB .NET
by Nick Symmonds

Publisher: Apress
ISBN: 159059035X
*/

using System;
using System.Drawing;
using System.Drawing.Drawing2D;

namespace Matrix_c
{
    public class Matrix1
    {
        [STAThread]
        static void Main(string[] args)
        {
          Matrix m = new Matrix();
          m.Rotate(90, MatrixOrder.Append);
          m.Translate(7, 12, MatrixOrder.Append);
          Point[] p = {new Point(20, 45)};
          Console.WriteLine(p.GetValue(0).ToString());
          m.TransformPoints(p);
          Console.WriteLine(p.GetValue(0).ToString());
    
          Console.ReadLine();
    }
    }
}


           
         
  








Related examples in the same category

1.new Matrix(0.707f, 0.707f, -0.707f, 0.707f, 0, 0)
2.Text direction (Matrix Rotate)
3.Matrix DrawMatrix Draw
4.Multiply two Matrixes
5.Matrix Util