Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the <b>SelectionPoint</b> class with specified location and size mode.
 /// </summary>
 /// <param name="x">The X coordinate.</param>
 /// <param name="y">The Y coordinate.</param>
 /// <param name="pt">Size mode.</param>
 public SelectionPoint(float x, float y, SizingPoint pt)
 {
     X           = x;
     Y           = y;
     SizingPoint = pt;
 }
Exemple #2
0
 public static Cursor ToCursor(SizingPoint p)
 {
     Cursor[] cursors = new Cursor[] { Cursors.Default, Cursors.SizeNWSE, Cursors.SizeNESW, Cursors.SizeNESW,
                                       Cursors.SizeNWSE, Cursors.SizeNS, Cursors.SizeNS, Cursors.SizeWE, Cursors.SizeWE };
     return(cursors[(int)p]);
 }
Exemple #3
0
 public static SizingPoint SwapHorizontally(SizingPoint p)
 {
     int[] swap = new int[] { 0, 3, 4, 1, 2, 5, 6, 8, 7 };
     return((SizingPoint)swap[(int)p]);
 }
Exemple #4
0
 public static SizingPoint SwapVertically(SizingPoint p)
 {
     int[] swap = new int[] { 0, 2, 1, 4, 3, 6, 5, 7, 8 };
     return((SizingPoint)swap[(int)p]);
 }
Exemple #5
0
        // sizing points and its numbers:
        // LeftTop (1)      TopCenter (5)      RightTop (3)
        //
        // LeftCenter (7)                      RightCenter (8)
        //
        // LeftBottom (2)   BottomCenter (6)   RightBottom (4)

        public static SizingPoint SwapDiagonally(SizingPoint p)
        {
            int[] swap = new int[] { 0, 4, 3, 2, 1, 5, 6, 7, 8 };
            return((SizingPoint)swap[(int)p]);
        }