CVB.Net 14.0
Size2Dd Struct Reference

Stores an ordered pair of doubles, typical the width and height of a RectD. More...

Public Member Functions

 Size2Dd (double width, double height)
 Creates a size with a given width and height . More...
 
 Size2Dd (Point2Dd 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 SizeD and equal. More...
 
override int GetHashCode ()
 Default implementation. More...
 

Static Public Member Functions

static Size2Dd Add (Size2Dd sz1, Size2Dd sz2)
 Adds the width and height of one SizeD structure width and height of another one. More...
 
static Size2Dd Subtract (Size2Dd sz1, Size2Dd sz2)
 Subtracts the width and height of one SizeD structure width and height of another one. More...
 
static implicit operator Size2Dd (Size2D sz)
 Converts the given Size2D sz to a Size2Dd. More...
 
static operator Point2Dd (Size2Dd sz)
 Converts the given sz to a Point2Dd. More...
 
static Size2Dd operator+ (Size2Dd sz1, Size2Dd sz2)
 Adds the width and height of one SizeD structure width and height of another one. More...
 
static Size2Dd operator- (Size2Dd sz1, Size2Dd sz2)
 Subtracts the width and height of one SizeD structure width and height of another one. More...
 
static bool operator== (Size2Dd sz1, Size2Dd sz2)
 Tests whether two sizes are equal. More...
 
static bool operator!= (Size2Dd sz1, Size2Dd sz2)
 Tests whether two sizes are unequal. More...
 

Static Public Attributes

static readonly Size2Dd Empty = new Size2Dd()
 Gets a SizeD with Width and Height value of 0.
 

Properties

double Width [get, set]
 Gets/sets the horizontal component of the size.
 
double Height [get, set]
 Gets/sets the vertical component of the size.
 

Detailed Description

Stores an ordered pair of doubles, typical the width and height of a RectD.

Constructor & Destructor Documentation

◆ Size2Dd() [1/2]

Size2Dd ( double  width,
double  height 
)

Creates a size with a given width and height .

Parameters
widthHorizontal component of the size.
heightVertical component of the size.

◆ Size2Dd() [2/2]

Size2Dd ( Point2Dd  pt)

Creates a size from the given point's pt horizontal and vertical components.

Parameters
ptPoint to initialize the size with.

Member Function Documentation

◆ Add()

static Size2Dd Add ( Size2Dd  sz1,
Size2Dd  sz2 
)
static

Adds the width and height of one SizeD structure width and height of another one.

Parameters
sz1First size to add.
sz2Second size to add.
Returns
Resulting SizeD from the addition operation.

◆ Equals()

override bool Equals ( object  obj)

Tests whether two objects are SizeD and equal.

Parameters
objObject to test.
Returns
true if they are exactly equal; false if not.

◆ GetHashCode()

override int GetHashCode ( )

Default implementation.

Returns
Default hash code.

◆ operator Point2Dd()

static operator Point2Dd ( Size2Dd  sz)
explicitstatic

Converts the given sz to a Point2Dd.

Parameters
szSize to convert.
Returns
New PointD.

◆ operator Size2Dd()

static implicit operator Size2Dd ( Size2D  sz)
static

Converts the given Size2D sz to a Size2Dd.

Parameters
szSize to convert.
Returns
New SizeD

.

◆ operator!=()

static bool operator!= ( Size2Dd  sz1,
Size2Dd  sz2 
)
static

Tests whether two sizes are unequal.

Parameters
sz1First size to test.
sz2Second size to test.
Returns
true if they are unequal; false if not.

◆ operator+()

static Size2Dd operator+ ( Size2Dd  sz1,
Size2Dd  sz2 
)
static

Adds the width and height of one SizeD structure width and height of another one.

Parameters
sz1First size to add.
sz2Second size to add.
Returns
Resulting SizeD from the addition operation.

◆ operator-()

static Size2Dd operator- ( Size2Dd  sz1,
Size2Dd  sz2 
)
static

Subtracts the width and height of one SizeD structure width and height of another one.

Parameters
sz1First size to subtract.
sz2Second size to subtract.
Returns
Resulting SizeD from the subtract operation.

◆ operator==()

static bool operator== ( Size2Dd  sz1,
Size2Dd  sz2 
)
static

Tests whether two sizes are equal.

Parameters
sz1First size to test.
sz2Second size to test.
Returns
true if they are exactly equal; false if not.

◆ Subtract()

static Size2Dd Subtract ( Size2Dd  sz1,
Size2Dd  sz2 
)
static

Subtracts the width and height of one SizeD structure width and height of another one.

Parameters
sz1First size to subtract.
sz2Second size to subtract.
Returns
Resulting SizeD from the subtract operation.

◆ ToString()

override string ToString ( )

Gets the string representation of this size.

Returns
String representation.