The RectD type exposes the following members.

Constructors

  NameDescription
Public methodRectD(PointD, PointD)
Initializes a new instance of the RectD struct using two point to define the bounds
Public methodRectD(PointD, SizeD)
Initializes a new instance of the RectD struct using the TopLeft corner and the Size.
Public methodRectD(Double, Double, Double, Double)
Initializes a new instance of the RectD struct.

Methods

  NameDescription
Public methodStatic memberAdd(RectD, PointD)
Adds the point to the given rectangle by enlarging the rectangle to Contains(PointD) the point, if it is not yet contained.
Public methodStatic memberAdd(RectD, RectD)
Combines the two rectangles creating a union.
Public methodContains(PointD)
Determines whether this rectangle contains the specified point.
Public methodContains(PointD, Double)
Determines whether this rectangle contains the specified point with respect to a given epsilon.
Public methodEquals(Object)
Indicates whether this instance and a specified object are equal.
(Overrides ValueType..::..Equals(Object).)
Public methodEquals(RectD)
Determines whether this instance has the same values as the given one.
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFindLineIntersection
Finds the intersection between a rectangle and a line.
Public methodStatic memberFromCenter
Creates a new instance given the center of the rectangle and its size.
Public methodStatic memberFromRect
Factory method that creates a RectD using the values form the given Rect.
Public methodStatic memberFromRectangle
Factory method that creates a RectD using the values form the given IRectangle.
Public methodGetEnlarged(Double)
Creates an enlarged instance of this rectangle using the same insets for all sides.
Public methodGetEnlarged(InsetsD)
Creates an enlarged instance that is the same as this one but enlarged by the specified insets.
Public methodGetHashCode
Returns the hash code for this instance.
(Overrides ValueType..::..GetHashCode()()()().)
Public methodGetTransformed
Transforms this instance using specified transform storing the bounds in place.
Public methodGetTranslated
Returns a translated instance of this which has modified X and Y by the given amount.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIntersects(RectD)
Determines whether the bounds of this struct intersect with the bounds of the specified rectangle.
Public methodIntersects(IOrientedRectangle, Double)
Determines whether this rectangle intersects an oriented rectangle, given an epsilon.
Public methodIntersectsLine
Determines whether this rectangle intersects a line.
Public methodIntersectsPolyline
Determines whether a rectangle intersects a polygonal line.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToImmutableRectangle
Creates an IRectangle using the values from this instance.
Public methodToMutableRectangle
Creates an IMutableRectangle using the values from this instance.
Public methodToRect
Creates an Rect instance that uses the same values as this instance.
Public methodToRectangle
Creates an IRectangle using the values from this instance.
Public methodToString
Creates a human readable from of this instance.
(Overrides ValueType..::..ToString()()()().)

Operators

  NameDescription
Public operatorStatic memberAddition(RectD, IPoint)
Implements the + operator.
Public operatorStatic memberAddition(RectD, IRectangle)
Implements the operator + for IRectangle like in Add(RectD, RectD).
Public operatorStatic memberAddition(RectD, InsetsD)
Implements the operator + mapping it to the GetEnlarged(InsetsD) method.
Public operatorStatic memberAddition(RectD, PointD)
Implements the + operator.
Public operatorStatic memberAddition(RectD, RectD)
Implements the operator + mapping it to the Add(RectD, RectD) method.
Public operatorStatic memberEquality
Implements the equality operation on RectD comparing X and Y and Width and Height for equality.
Public operatorStatic memberExplicitNarrowingExplicitExplicitExplicit(ImmutableRectangle to RectD)
Performs an explicit conversion from ImmutableRectangle to RectD.
Public operatorStatic memberExplicitNarrowingExplicitExplicitExplicit(Rectangle to RectD)
Performs an explicit conversion from Rectangle to RectD.
Public operatorStatic memberExplicitNarrowingExplicitExplicitExplicit(RectD to Rectangle)
Performs an explicit conversion from RectD to Rectangle.
Public operatorStatic memberExplicitNarrowingExplicitExplicitExplicit(RectD to Rect)
Performs an explicit conversion from RectD to Rect.
Public operatorStatic memberImplicitWideningImplicitImplicitImplicit(Rect to RectD)
Performs an implicit conversion from Rect to RectD.
Public operatorStatic memberImplicitWideningImplicitImplicitImplicit(RectD to ImmutableRectangle)
Performs an implicit conversion from RectD to ImmutableRectangle.
Public operatorStatic memberInequality
Implements the inequality operation on RectD comparing X and Y and Width and Height for equality.

Extension Methods

  NameDescription
Public Extension MethodContains
Determines whether the given rectangle contains the provided point.
(Defined by RectangleExtensions.)
Public Extension MethodDistanceTo
Calculates the Euclidean distance between two points.
(Defined by PointExtensions.)
Public Extension MethodGetBottomLeft
Gets the coordinates of the bottom left corner of the rectangle as a PointD.
(Defined by RectangleExtensions.)
Public Extension MethodGetBottomRight
Gets the coordinates of the bottom right corner of the rectangle as a PointD.
(Defined by RectangleExtensions.)
Public Extension MethodGetCenter
Gets the coordinates of the center of the rectangle as a PointD.
(Defined by RectangleExtensions.)
Public Extension MethodGetDynamicCenter
Create a dynamic IPoint implementation that always points to the center of the given rectangle.
(Defined by RectangleExtensions.)
Public Extension MethodGetDynamicPoint
Create a dynamic IPoint implementation that always points to the specified position at the given rectangle.
(Defined by RectangleExtensions.)
Public Extension MethodGetMaxX
Gets the maximum X coordinate of the rectangle.
(Defined by RectangleExtensions.)
Public Extension MethodGetMaxY
Gets the maximum Y coordinate of the rectangle.
(Defined by RectangleExtensions.)
Public Extension MethodGetSize
Gets the current size of the rectangle as a SizeD struct.
(Defined by RectangleExtensions.)
Public Extension MethodGetTopLeft
Gets the coordinates of the top left corner of the rectangle as a PointD.
(Defined by RectangleExtensions.)
Public Extension MethodGetTopRight
Gets the coordinates of the top right corner of the rectangle as a PointD.
(Defined by RectangleExtensions.)
Public Extension MethodIsEmpty
Determines whether the specified rectangle is empty.
(Defined by RectangleExtensions.)
Public Extension MethodToPoint
Copies the current values of the coordinates of the point to a PointD struct.
(Defined by PointExtensions.)
Public Extension MethodToRectangle2D
Creates a Rectangle2D.Double from a given RectD.
(Defined by GeomExtensions.)
Public Extension MethodToRectD
Copies the current values of the rectangle to RectD struct.
(Defined by RectangleExtensions.)
Public Extension MethodToSize
Converts the ISize to a SizeD struct.
(Defined by SizeExtensions.)
Public Extension MethodToYRectangle
Creates a YRectangle from a given RectD.
(Defined by GeomExtensions.)

Properties

  NameDescription
Public propertyArea
Gets the area of this instance which is the product of Width and Height.
Public propertyBottomLeft
Gets the coordinates of the bottom left corner of the rectangle.
Public propertyBottomRight
Gets the coordinates of the bottom right corner of the rectangle.
Public propertyCenter
Gets or sets the center of the rectangle using CenterX and CenterY.
Public propertyCenterX
Gets the center X coordinate of the rectangle.
Public propertyCenterY
Gets the center Y coordinate of the rectangle.
Public propertyStatic memberEmpty
Gets an empty rectangle.
Public propertyHeight
Gets or sets the height of the rectangle.
Public propertyStatic memberInfinite
Gets an infinite rectangle.
Public propertyIsEmpty
Gets a value indicating whether this instance is considered empty.
Public propertyIsFinite
Gets a value indicating whether this instance is finite.
Public propertyMaxX
Gets or sets the coordinates of the right border for this struct.
Public propertyMaxY
Gets or sets the coordinates of the lower border for this struct.
Public propertyMinX
Gets or sets the X coordinates of the left side of this struct without modifying the MaxX by adjusting the Width correspondingly.
Public propertyMinY
Gets or sets the Y coordinates of the top side of this struct without modifying the MaxY by adjusting the Height correspondingly.
Public propertySize
Gets the size of this instance.
Public propertyTopLeft
Gets the coordinates of the top left corner of the rectangle.
Public propertyTopRight
Gets the coordinates of the top right corner of the rectangle.
Public propertyWidth
Gets or sets the width of the rectangle.
Public propertyX
Gets or sets the X coordinate of the upper left corner of the rectangle.
Public propertyY
Gets or sets the Y coordinate of the upper left corner of the rectangle.

See Also