public void CreatePlot(string[] ArrayOfPlotPoints)
 {
     List<int> PlotPoints = new List<int>();
     for (int i = 0; i < ArrayOfPlotPoints.Length; i++)
     {
         PlotPoints.Add( Convert.ToInt32(ArrayOfPlotPoints[i]));
     }
     int X1Coord = (PlotPoints[0] + PlotPoints[3]);
     int Y1Coord = (PlotPoints[1] + PlotPoints[2]);
     Plot plot = new Plot(PlotPoints[0], PlotPoints[1], PlotPoints[2], PlotPoints[3], X1Coord, Y1Coord );
     
     plots.Add(plot);
 }
        public void rotateNinetyDegrees(Plot plot, int counter)
        {
            
            for (int i = counter; i <= counter; i++)
            {
                Xcoordinate = plot.X;
                Ycoordinate = plot.Y;
                height = plot.W;
                width = plot.H;

                X1coordinate = plot.X + plot.W;
                Y1coordinate = plot.Y + plot.H;
            }

            Plot rotatedPlot = new Plot(Xcoordinate,Ycoordinate,height,width,X1coordinate,Y1coordinate);
            RotatedPlots.Add(rotatedPlot);


        }
 public int GetPerimeter(Plot plot)
 {
     int Perimeter = 2 * (plot.H + plot.W);
     return Perimeter;
 }
Exemple #4
0
        public int GetPerimeter(Plot plot)
        {
            int Perimeter = 2 * (plot.H + plot.W);

            return(Perimeter);
        }