예제 #1
0
        public TekAreaDef FlipHorizontal()
        {
            TekAreaDef result = new TekAreaDef(String.Format("{0} hori flip", Description));

            for (int i = 0; i < Points.Count; i++)
            {
                Point P = Points[i];
                result.AddPoint(new Point(xMax - P.X, P.Y));
            }
            return(result.Normalized());
        }
예제 #2
0
        public TekAreaDef Rotate90()
        {
            TekAreaDef result = new TekAreaDef(String.Format("{0} rot 90", Description), this.Points[0]);

            foreach (Point value in this.Deltas)
            {
                result.Deltas.Add(new Point(-value.Y, value.X));
                Point p = result.Deltas.ElementAt(result.Deltas.Count - 1);
                result.AddPoint(new Point(this.Points[0].X + p.X, this.Points[0].Y + p.Y));
            }
            return(result.Normalized());
        }