Example #1
0
        internal static Rect ToRect(RECT rc)
        {
            Rect rect = new Rect();

            rect.X = rc.left;
            rect.Y = rc.top;
            rect.Width = rc.right - rc.left;
            rect.Height = rc.bottom - rc.top;

            return rect;
        }
Example #2
0
        internal static RECT FromRect(Rect rect)
        {
            RECT rc = new RECT();

            rc.top = DoubleToInt(rect.Y);
            rc.left = DoubleToInt(rect.X);
            rc.bottom = DoubleToInt(rect.Bottom);
            rc.right = DoubleToInt(rect.Right);

            return rc;
        }