Microsoft.AzureCat.Samples.AlertClient.Shape.SetupTransform C# (CSharp) Метод

SetupTransform() защищенный Метод

Sets up the transform for each shape
As each shape is drawn the transform for that shape including rotation and location is made to a new Matrix object. This matrix is used to modify the graphics transform For each shape
protected SetupTransform ( Graphics g ) : void
g System.Drawing.Graphics The Graphics being drawn on
Результат void
        protected void SetupTransform(Graphics g)
        {
            state = g.Save();
            var matrix = new Matrix();
            matrix.Rotate(Rotation, MatrixOrder.Append);
            matrix.Translate(Location.X, Location.Y, MatrixOrder.Append);
            g.Transform = matrix;
        }