예제 #1
0
        /// <summary>
        /// Return copy of specified rectangle translated by the specified delta
        /// </summary>
        /// <param name="rectangle">source to copy and translate</param>
        /// <param name="delta">translation vector</param>
        /// <returns>copy of specified rectangle translated by the specified delta</returns>
        public static Rectangle Translate(Rectangle rectangle, Point delta)
        {
            rectangle.Center += delta;
#if SHARPKIT //https://code.google.com/p/sharpkit/issues/detail?id=369 there are no structs in js
            return(rectangle.Clone());
#else
            return(rectangle);
#endif
        }
 public static Rectangle GetScaled(Rectangle rect, double scale)
 {
     var scaled = rect.Clone();
     scaled.ScaleAroundCenter(scale);
     return scaled;
 }