Class SharpDXSize2Extensions
Extension methods for the SharpDX Size 2 types.
Inherited Members
Namespace: Gorgon.Graphics
Assembly: Gorgon.Core.dll
Syntax
public static class SharpDXSize2Extensions
Methods
| Edit this page View SourceCeiling(Size2F)
Function to set the size coordinates to the nearest integer values that are higher than or equal to the original values.
Declaration
public static Size2F Ceiling(this Size2F size)
Parameters
Type | Name | Description |
---|---|---|
Size2F | size | The size to ceiling. |
Returns
Type | Description |
---|---|
Size2F | The truncated size. |
Floor(Size2F)
Function to set the size coordinates to the nearest integer values that are lower than or equal to the original values.
Declaration
public static Size2F Floor(this Size2F size)
Parameters
Type | Name | Description |
---|---|---|
Size2F | size | The size to floor. |
Returns
Type | Description |
---|---|
Size2F | The truncated size. |
ToPoint(Size2)
Function to convert an integer size to a point.
Declaration
public static Point ToPoint(this Size2 size)
Parameters
Type | Name | Description |
---|---|---|
Size2 | size | The size value to convert. |
Returns
Type | Description |
---|---|
Point | The point value. |
ToSize2(Point)
Function to convert an integer size to a point.
Declaration
public static Size2 ToSize2(this Point point)
Parameters
Type | Name | Description |
---|---|---|
Point | point | The point value to convert. |
Returns
Type | Description |
---|---|
Size2 | The size value. |
ToSize2(Size2F)
Function to convert a size into an integer size.
Declaration
public static Size2 ToSize2(this Size2F size)
Parameters
Type | Name | Description |
---|---|---|
Size2F | size | The size to convert. |
Returns
Type | Description |
---|---|
Size2 | The equivalent size value. |
ToSize2F(Size2)
Function to convert a size into an floating point size.
Declaration
public static Size2F ToSize2F(this Size2 size)
Parameters
Type | Name | Description |
---|---|---|
Size2 | size | The size to convert. |
Returns
Type | Description |
---|---|
Size2F | The equivalent size value. |
ToVector2(Size2)
Function to convert a size into a vector.
Declaration
public static Vector2 ToVector2(this Size2 size)
Parameters
Type | Name | Description |
---|---|---|
Size2 | size | The size to convert. |
Returns
Type | Description |
---|---|
Vector2 | The equivalent vector value. |
ToVector2(Size2F)
Function to convert a size into a vector.
Declaration
public static Vector2 ToVector2(this Size2F size)
Parameters
Type | Name | Description |
---|---|---|
Size2F | size | The size to convert. |
Returns
Type | Description |
---|---|
Vector2 | The equivalent vector value. |
ToVector3(Size2)
Function to convert a size into a vector.
Declaration
public static Vector3 ToVector3(this Size2 size)
Parameters
Type | Name | Description |
---|---|---|
Size2 | size | The size to convert. |
Returns
Type | Description |
---|---|
Vector3 | The equivalent vector value. |
ToVector4(Size2)
Function to convert a size into a vector.
Declaration
public static Vector4 ToVector4(this Size2 size)
Parameters
Type | Name | Description |
---|---|---|
Size2 | size | The size to convert. |
Returns
Type | Description |
---|---|
Vector4 | The equivalent vector value. |
Truncate(Size2F)
Function to truncate the size coordinates to the whole number portion of their values.
Declaration
public static Size2F Truncate(this Size2F size)
Parameters
Type | Name | Description |
---|---|---|
Size2F | size | The size to truncate. |
Returns
Type | Description |
---|---|
Size2F | The truncated size. |
Remarks
This method converts the coordinates to integer values without applying rounding.