Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RectI"/> structure with the specified
        /// <see cref="PointI"/> coordinates and <see cref="SizeI"/> dimensions.</summary>
        /// <param name="location">
        /// The <see cref="Location"/> of the <see cref="RectI"/>.</param>
        /// <param name="size">
        /// The <see cref="Size"/> of the <see cref="RectI"/>.</param>

        public RectI(PointI location, SizeI size)
        {
            X      = location.X;
            Y      = location.Y;
            Width  = size.Width;
            Height = size.Height;
        }
Esempio n. 2
0
        /// <summary>
        /// Converts the specified <see cref="SizeI"/> to a GDI <see cref="Size"/>.</summary>
        /// <param name="size">
        /// The <see cref="SizeI"/> instance to convert.</param>
        /// <returns>
        /// A new GDI <see cref="Size"/> instance whose dimensions equal those of the specified
        /// <paramref name="size"/>.</returns>

        public static Size ToGdiSize(this SizeI size)
        {
            return(new Size(size.Width, size.Height));
        }