Esempio n. 1
0
        public static void UpdateScratchZoneBox(Point p)
        {
            int minx, miny, maxx, maxy;

            minx             = Utils3D.Min(scratchZoneOrigin.X, p.X);
            miny             = Utils3D.Min(scratchZoneOrigin.Y, p.Y);
            maxx             = Utils3D.Max(scratchZoneOrigin.X, p.X);
            maxy             = Utils3D.Max(scratchZoneOrigin.Y, p.Y);
            scratchZoneStart = new Point(minx, miny);
            scratchZoneEnd   = new Point(maxx, maxy);
        }
Esempio n. 2
0
        /// <summary>
        /// Set the selection box,
        /// ensuring that the selection start represents the minimum bounds of the box
        /// and the selection end represents the maximum bounds of box
        /// </summary>
        public static void UpdateSelectionBox(Point p)
        {
            int minx, miny, maxx, maxy;

            minx           = Utils3D.Min(selectionOrigin.X, p.X);
            miny           = Utils3D.Min(selectionOrigin.Y, p.Y);
            maxx           = Utils3D.Max(selectionOrigin.X, p.X);
            maxy           = Utils3D.Max(selectionOrigin.Y, p.Y);
            selectionStart = new Point(minx, miny);
            selectionEnd   = new Point(maxx, maxy);
        }