Stores an ordered pair of integers, typical the width and height of a Rect. More...
Public Member Functions | |
Size2D (int width, int height) | |
Creates a size with a given width and height . More... | |
Size2D (Point2D pt) | |
Creates a size from the given point's pt horizontal and vertical components. More... | |
override string | ToString () |
Gets the string representation of this size. More... | |
override bool | Equals (object obj) |
Tests whether two objects are Size2D and equal. More... | |
override int | GetHashCode () |
Default implementation. More... | |
Static Public Member Functions | |
static Size2D | Add (Size2D sz1, Size2D sz2) |
Adds the width and height of one Size2D structure width and height of another one. More... | |
static Size2D | Subtract (Size2D sz1, Size2D sz2) |
Subtracts the width and height of one Size2D structure width and height of another one. More... | |
static | operator Point2D (Size2D sz) |
Converts the given sz to a Point2D. More... | |
static Size2D | operator+ (Size2D sz1, Size2D sz2) |
Adds the width and height of one Size2D structure width and height of another one. More... | |
static Size2D | operator- (Size2D sz1, Size2D sz2) |
Subtracts the width and height of one Size2D structure width and height of another one. More... | |
static bool | operator== (Size2D sz1, Size2D sz2) |
Tests whether two sizes are equal. More... | |
static bool | operator!= (Size2D sz1, Size2D sz2) |
Tests whether two sizes are unequal. More... | |
Static Public Attributes | |
static readonly Size2D | Empty = new Size2D() |
Gets a Size2D with Width and Height value of 0. | |
Properties | |
int | Width [get, set] |
Gets/sets the horizontal component of the size. | |
int | Height [get, set] |
Gets/sets the vertical component of the size. | |
Stores an ordered pair of integers, typical the width and height of a Rect.
Size2D | ( | int | width, |
int | height | ||
) |
Creates a size with a given width and height .
width | Horizontal component of the size. |
height | Vertical component of the size. |
Creates a size from the given point's pt horizontal and vertical components.
pt | Point to initialize the size with. |
Adds the width and height of one Size2D structure width and height of another one.
sz1 | First size to add. |
sz2 | Second size to add. |
SizeD
from the addition operation.override bool Equals | ( | object | obj | ) |
Tests whether two objects are Size2D and equal.
obj | Object to test. |
true
if they are exactly equal; false
if not. override int GetHashCode | ( | ) |
Default implementation.
Tests whether two sizes are unequal.
sz1 | First size to test. |
sz2 | Second size to test. |
true
if they are unequal; false
if not. Adds the width and height of one Size2D structure width and height of another one.
sz1 | First size to add. |
sz2 | Second size to add. |
SizeD
from the addition operation.Tests whether two sizes are equal.
sz1 | First size to test. |
sz2 | Second size to test. |
true
if they are exactly equal; false
if not. Subtracts the width and height of one Size2D structure width and height of another one.
sz1 | First size to subtract. |
sz2 | Second size to subtract. |
SizeD
from the subtract operation.override string ToString | ( | ) |
Gets the string representation of this size.