Size
Struct in Zigurous.Architecture
Declaration
[Serializable]
public struct Size : IEquatable<Size>, IComparable<Size>
Description
Stores the size of an entity as a width and height.
Static Properties
zero | Shorthand for writing Size(0, 0) . |
one | Shorthand for writing Size(1, 1) . |
max | Shorthand for writing Size(int.MaxValue, int.MaxValue) . |
sq2 | Shorthand for writing Size(2) . |
sq4 | Shorthand for writing Size(4) . |
sq8 | Shorthand for writing Size(8) . |
sq16 | Shorthand for writing Size(16) . |
sq32 | Shorthand for writing Size(32) . |
sq64 | Shorthand for writing Size(64) . |
sq128 | Shorthand for writing Size(128) . |
sq256 | Shorthand for writing Size(256) . |
sq512 | Shorthand for writing Size(512) . |
sq1024 | Shorthand for writing Size(1024) . |
sq2048 | Shorthand for writing Size(2048) . |
sq4096 | Shorthand for writing Size(4096) . |
sq8192 | Shorthand for writing Size(8192) . |
Properties
width | The width of the entity. |
height | The height of the entity. |
Area | The area of the entity (width * height) (Read only). |
Constructors
Size | Creates a new size with the specified width and height. |
Methods
CompareTo | Compares this instance with another and returns an integer that indicates whether this instance precedes, follows, or appears in the same position in the sort order as the other instance. |
Equals | Determines if the size is equal to another size. |
GetHashCode | Returns the hash code of the size. |
ToString | Converts the size to a string. |
Operators
Equality | Determines if two sizes are equal. |
Inequality | Determines if two sizes are not equal. |