Example #1
0
            public void FlipOnHorizontalAxis()
            {
                var imageHeight = Image.Max(p => p.Y);

                Image.ForEach(p => p.Y = imageHeight - p.Y);
                Tile tempTile = North;

                North = South;
                South = tempTile;
                string tempEdge = EdgeN;

                EdgeN = EdgeS;
                EdgeS = tempEdge;
                EdgeE = new string(EdgeE.Reverse().ToArray());
                EdgeW = new string(EdgeW.Reverse().ToArray());
            }
Example #2
0
 public void Rotate(int rotations)
 {
     for (int i = 0; i < rotations; i++)
     {
         var imageHeight = Image.Max(p => p.Y);
         foreach (var point in Image)
         {
             int temp = point.Y;
             point.Y = point.X;
             point.X = imageHeight - temp;
         }
         Tile tempTile = North;
         North = West;
         West  = South;
         South = East;
         East  = tempTile;
         string tempEdge = EdgeN;
         EdgeN = new string(EdgeW.Reverse().ToArray());
         EdgeW = EdgeS;
         EdgeS = new string(EdgeE.Reverse().ToArray());
         EdgeE = tempEdge;
     }
 }