Skip to content

ExtensionsColorNumericsMonoGame Class

Extensions to convert Vector4 to/from SadRogue.Primitives.Color.

C#
public static class ExtensionsColorNumericsMonoGame

Inheritance object

Converts a Vector4 to a Microsoft.Xna.Framework.Color.

C#
public static Color ToMonoGameColor(this Vector4 value)

value Vector4
The vector color to convert.

Microsoft.Xna.Framework.Color
The Microsoft.Xna.Framework.Color representing the color.

Converts a Vector3 to a Microsoft.Xna.Framework.Color.

C#
public static Color ToMonoGameColor(this Vector3 value)

value Vector3
The vector color to convert.

Microsoft.Xna.Framework.Color
The Microsoft.Xna.Framework.Color representing the color.

Gets a Vector2 representing the UV coordinates of a Microsoft.Xna.Framework.Point within a Microsoft.Xna.Framework.Point size.

C#
public static Vector2 ToUV(this Point point, Point size)

point Microsoft.Xna.Framework.Point
The coordinates within the size.

size Microsoft.Xna.Framework.Point
The size.

Vector2
The UV coordinates.