Exemple #1
0
        /// <summary>
        /// Reflect throught the point given.
        /// Switches Top Left and Bottom Right to maintain validity.
        /// </summary>
        /// <param name="Point">Reflection point.</param>
        public override void Reflect(C2DPoint Point)
        {
            TopLeft.Reflect(Point);
            BottomRight.Reflect(Point);

            double x = TopLeft.x;
            double y = TopLeft.y;

            TopLeft.Set(BottomRight);
            BottomRight.x = x;
            BottomRight.y = y;
        }
Exemple #2
0
 /// <summary>
 /// Assignment.
 /// </summary>
 /// <param name="ptTopLeft">The top left point.</param>
 /// <param name="ptBottomRight">The bottom right point.</param>
 public void Set(C2DPoint ptTopLeft, C2DPoint ptBottomRight)
 {
     TopLeft.Set(ptTopLeft);
     BottomRight.Set(ptBottomRight);
 }
Exemple #3
0
 /// <summary>
 /// Constructor sets both the top left and bottom right to equal the rect.
 /// </summary>
 /// <param name="pt">Point.</param>
 public C2DRect(C2DPoint pt)
 {
     TopLeft.Set(pt);
     BottomRight.Set(pt);
 }
Exemple #4
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="Other">The other rect.</param>
 public C2DRect(C2DRect Other)
 {
     TopLeft.Set(Other.TopLeft);
     BottomRight.Set(Other.BottomRight);
 }