Enhanced C#
Language of your choice: library documentation

Represents a mutable 2D rectangle. More...
Represents a mutable 2D rectangle.
T  Type of each coordinate. 
This interface can represent one of three types of rectangles: either "normal" rectangles with fundamental variables X, Y, Width, Height, bounding rectangles with two coordinate ranges (X1X2) and (Y1Y2), or or pairs of points (X1, Y1) and (X2, Y2).
Because of this fact, it is not clear when you modify X1 whether this should affect X2 or Width. Similarly, when you modify X2, Y1 or Y2, it is not clear whether the size property or the opposite boundary should change. To resolve this question, this interface does not allow you to modify the coordinates individually; instead you must change them in pairs: you either set X and Width together, or X1 and X2 together; and similarly Y and Height together, or Y1 and Y2 together.
You can also call the extension methods SetRect() or SetRange() to set all four coordinates at once.
Public Member Functions  
void  SetXAndWidth (T x, T width) 
void  SetYAndHeight (T y, T height) 
void  SetXRange (T x1, T x2) 
void  SetYRange (T x1, T x2) 
Additional Inherited Members  
Properties inherited from Loyc.Geometry.IRectangleReader< T >  
T  X1 [get] 
T  Y1 [get] 
T  X2 [get] 
T  Y2 [get] 
Properties inherited from Loyc.Geometry.ISizeReader< T >  
T  Width [get] 
Gets the width of a rectangle (the difference between X coordinates). More...  
T  Height [get] 
Gets the height of a rectangle (the difference between Y coordinates). More...  