Exemplo n.º 1
0
 /// <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;
 }
Exemplo n.º 2
0
 /// <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;
 }
Exemplo n.º 3
0
 /// <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);
 }
Exemplo n.º 4
0
 /// <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);
 }
Exemplo n.º 5
0
 static PointD()
 {
     Empty = new PointD();
 }
Exemplo n.º 6
0
 /// <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));
 }
Exemplo n.º 7
0
 /// <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));
 }
Exemplo n.º 8
0
 /// <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;
 }