Gorgon
Show / Hide Table of Contents

Class SharpDXSize2Extensions

Extension methods for the SharpDX Size 2 types.

Inheritance
object
SharpDXSize2Extensions
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: Gorgon.Graphics
Assembly: Gorgon.Core.dll
Syntax
public static class SharpDXSize2Extensions

Methods

| Edit this page View Source

Ceiling(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.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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.

  • Edit this page
  • View Source
In this article
Back to top Copyright 2023 - Licensed under the MIT license by Michael Winsor (Tape_Worm).
Send comments on this topic to the author