示例#1
0
 public static Line BottomLine(this Rectangle rect)
 {
     return new Line(rect.BottomLeft(), rect.BottomRight());
 }
示例#2
0
 /// <summary>
 /// Converts this envelope into a linear ring.
 /// </summary>
 /// <param name="self">The IEnvelope to use with this method</param>
 /// <returns>A Linear ring describing the border of this envelope.</returns>
 public static ILinearRing ToLinearRing(this IEnvelope self)
 {
     // Holes are counter clockwise, so this should create
     // a clockwise linear ring.
     CoordinateListSequence coords = new CoordinateListSequence();
     coords.Add(self.TopLeft());
     coords.Add(self.TopRight());
     coords.Add(self.BottomRight());
     coords.Add(self.BottomLeft());
     coords.Add(self.TopLeft()); // close the polygon
     return new LinearRing(coords);
 }
示例#3
0
 public static Line LeftLine(this Rectangle rect)
 {
     return new Line(rect.TopLeft(), rect.BottomLeft());
 }
	public static Rect BottomLeft(this Rect r, Vector2 v) { return r.BottomLeft(v.x, v.y); }
示例#5
0
 /// <summary>
 /// Gets an ILineSegment from the top right corner to the bottom right corner
 /// </summary>
 /// <param name="self">The IEnvelope to use with this method</param>
 public static ILineSegment BottomBorder(this IEnvelope self)
 {
     return new LineSegment(self.BottomRight(), self.BottomLeft());
 }
	public static Rect BottomLeft(this Rect r, float f) { return r.BottomLeft(f, f); }
	public static Rect LowerLeft(this Rect r, float width, float height) { return r.BottomLeft(width, height); }
	public static Rect LowerLeft(this Rect r, Vector2 v) { return r.BottomLeft(v); }
	public static Vector2 LowerLeft(this Rect r) { return r.BottomLeft(); }
示例#10
0
	public static Rect Lower(this Rect r, float p) { return r.BottomLeft(1, p); }