/// <summary>Initializes a new instance of the <see cref="T:System.Drawing.RectangleD"></see> class with the specified location and size.</summary> /// <param name="size">A <see cref="T:System.Drawing.SizeD"></see> that represents the width and height of the rectangular region. </param> /// <param name="location">A <see cref="T:System.Drawing.PointD"></see> that represents the upper-left corner of the rectangular region. </param> public RectangleD(PointD location, SizeD size) { this.x = location.X; this.y = location.Y; this.width = size.Width; this.height = size.Height; }
/// <summary>Initializes a new instance of the <see cref="T:SharpMap.Data.Providers.EGIS.ShapeFileLib.SizeD"></see> class from the specified <see cref="T:EGIS.ShapeFileLib.PointD"></see>.</summary> /// <param name="pt">The <see cref="T:EGIS.ShapeFileLib.PointD"></see> from which to initialize this <see cref="T:SharpMap.Data.Providers.EGIS.ShapeFileLib.SizeD"></see>. </param> public SizeD(PointD pt) { this.width = pt.X; this.height = pt.Y; }
/// <summary>Adjusts the location of this rectangle by the specified amount.</summary> /// <returns>This method does not return a value.</returns> /// <param name="pos">The amount to offset the location. </param> /// <filterpriority>1</filterpriority> public void Offset(PointD pos) { this.Offset(pos.X, pos.Y); }
/// <summary>Determines if the specified point is contained within this <see cref="T:System.Drawing.RectangleD"></see> structure.</summary> /// <returns>This method returns true if the point represented by the pt parameter is contained within this <see cref="T:System.Drawing.RectangleD"></see> structure; otherwise false.</returns> /// <param name="pt">The <see cref="T:System.Drawing.PointD"></see> to test. </param> /// <filterpriority>1</filterpriority> public bool Contains(PointD pt) { return this.Contains(pt.X, pt.Y); }
static PointD() { Empty = new PointD(); }
/// <summary>Translates a <see cref="T:EGIS.ShapeFileLib.PointD"></see> by the negative of a specified size.</summary> /// <returns>The translated <see cref="T:EGIS.ShapeFileLib.PointD"></see>.</returns> /// <param name="sz">The <see cref="T:EGIS.ShapeFileLib.SizeD"></see> that specifies the numbers to subtract from the coordinates of pt.</param> /// <param name="pt">The <see cref="T:EGIS.ShapeFileLib.PointD"></see> to translate.</param> public static PointD Subtract(PointD pt, SizeD sz) { return(new PointD(pt.X - sz.Width, pt.Y - sz.Height)); }
/// <summary>Translates a given <see cref="T:EGIS.ShapeFileLib.PointD"></see> by a specified <see cref="T:EGIS.ShapeFileLib.SizeD"></see>.</summary> /// <returns>The translated <see cref="T:EGIS.ShapeFileLib.PointD"></see>.</returns> /// <param name="sz">The <see cref="T:EGIS.ShapeFileLib.SizeD"></see> that specifies the numbers to add to the coordinates of pt.</param> /// <param name="pt">The <see cref="T:EGIS.ShapeFileLib.PointD"></see> to translate.</param> public static PointD Add(PointD pt, SizeD sz) { return(new PointD(pt.X + sz.Width, pt.Y + sz.Height)); }