MuGameFramework  1.0
MuGameFramework is a 2D game framework built upon C# and SFML
 All Classes Namespaces Files Functions Variables Enumerations Properties
MuGameFramework.Components.Size Struct Reference

Represents an objects Width and Height More...

Public Member Functions

 Size (int width, int height)
 Create an instance of Size
override bool Equals (object obj)
 Compare a size with this for equality
override int GetHashCode ()
 Get the hash code for this object
override string ToString ()
 Print out the values of a size as a string

Static Public Member Functions

static implicit operator string (Size value)
 Print out the values of a size as a string
static Size operator+ (Size a, Size b)
 Add two Sizes together
static Size operator- (Size a, Size b)
 Subtract two Sizes
static Size operator* (Size a, Size b)
 Multiply two sizes together
static Size operator* (Size a, int b)
 Multiply a scalar to a size
static Size operator* (int a, Size b)
 Multiply a scalar to a size
static Size operator/ (Size a, Size b)
 Divide two sizes together
static Size operator/ (Size a, int b)
 Divide a scalar to a size
static Size operator/ (int a, Size b)
 Divide a scalar to a size
static bool operator== (Size a, Size b)
 Compare two sizes for equality
static bool operator!= (Size a, Size b)
 Compare two sizes for inequality

Public Attributes

int Width
 Width of this Size object
int Height
 Height of this Size object

Static Public Attributes

static readonly Size Zero = new Size(0, 0)
 Returns a size with the value of Zero

Detailed Description

Represents an objects Width and Height

Constructor & Destructor Documentation

MuGameFramework.Components.Size.Size ( int  width,
int  height 
)

Create an instance of Size

Member Function Documentation

override bool MuGameFramework.Components.Size.Equals ( object  obj)

Compare a size with this for equality

Parameters
objSize to compare
Returns
Result of comparison
override int MuGameFramework.Components.Size.GetHashCode ( )

Get the hash code for this object

Returns
The hash code for this object
static implicit MuGameFramework.Components.Size.operator string ( Size  value)
static

Print out the values of a size as a string

Parameters
valueSize to print out
Returns
String of thus Size
static bool MuGameFramework.Components.Size.operator!= ( Size  a,
Size  b 
)
static

Compare two sizes for inequality

Parameters
aSize A to check
bSize B to check
Returns
Result of comparison
static Size MuGameFramework.Components.Size.operator* ( Size  a,
Size  b 
)
static

Multiply two sizes together

Parameters
aSize A to multiply together
bSize B to multiply together
Returns
Final size
static Size MuGameFramework.Components.Size.operator* ( Size  a,
int  b 
)
static

Multiply a scalar to a size

Parameters
aSize A to multiply
bScalar to multiply by
Returns
Final size
static Size MuGameFramework.Components.Size.operator* ( int  a,
Size  b 
)
static

Multiply a scalar to a size

Parameters
aScalar to multiply by
bSize B to multiply
Returns
Final size
static Size MuGameFramework.Components.Size.operator+ ( Size  a,
Size  b 
)
static

Add two Sizes together

Parameters
aSize A to add
bSize B to add
Returns
Final size
static Size MuGameFramework.Components.Size.operator- ( Size  a,
Size  b 
)
static

Subtract two Sizes

Parameters
aSize A to subtract
bSize B to subtract
Returns
Final size
static Size MuGameFramework.Components.Size.operator/ ( Size  a,
Size  b 
)
static

Divide two sizes together

Parameters
aSize A to divide together
bSize B to divide together
Returns
Final size
static Size MuGameFramework.Components.Size.operator/ ( Size  a,
int  b 
)
static

Divide a scalar to a size

Parameters
aSize A to divide
bScalar to divide by
Returns
Final size
static Size MuGameFramework.Components.Size.operator/ ( int  a,
Size  b 
)
static

Divide a scalar to a size

Parameters
aScalar to divide by
bSize B to divide
Returns
Final size
static bool MuGameFramework.Components.Size.operator== ( Size  a,
Size  b 
)
static

Compare two sizes for equality

Parameters
aSize A to check
bSize B to check
Returns
Result of comparison
override string MuGameFramework.Components.Size.ToString ( )

Print out the values of a size as a string

Returns
String of thus Size

Member Data Documentation

int MuGameFramework.Components.Size.Height

Height of this Size object

int MuGameFramework.Components.Size.Width

Width of this Size object

readonly Size MuGameFramework.Components.Size.Zero = new Size(0, 0)
static

Returns a size with the value of Zero


The documentation for this struct was generated from the following file: