예제 #1
0
        /// <summary>
        /// Shifts a covering rectangle either east (for vertical strips),
        /// or north (for horizontal strips).
        /// </summary>
        /// <param name="w">The extent to shift</param>
        void ShiftStrip(Extent w)
        {
            // Shift vertical strips east; shift horizontal strips north

            if (w.Height > w.Width)
            {
                w.Increase((w.Width + 1) / 2, 0);
            }
            else
            {
                w.Increase(0, (w.Height + 1) / 2);
            }
        }
예제 #2
0
        /// <summary>
        /// Shifts a covering rectangle either east (for vertical strips),
        /// or north (for horizontal strips).
        /// </summary>
        /// <param name="w">The extent to shift</param>
        void ShiftStrip(Extent w)
        {
            // Shift vertical strips east; shift horizontal strips north

            if (w.Height > w.Width)
                w.Increase((w.Width+1)/2, 0);
            else
                w.Increase(0, (w.Height+1)/2);
        }