Vertices Engine  v1.9.2.92
A Cross Platform game engine developed by Virtex Edge Design.
Loading...
Searching...
No Matches
vxExtensions Class Reference

Public Types

enum  ImageType { PNG , JPG }
 

Static Public Member Functions

static IEnumerable< Type > GetTypesWithAttribute (this System.Reflection.Assembly assembly, Type attributeType)
 
static bool IsFlagSet< T > (this T value, T flag)
 
static IEnumerable< T > GetFlags< T > (this T value)
 
static T SetFlags< T > (this T value, T flags, bool on)
 
static T SetFlags< T > (this T value, T flags)
 
static T ClearFlags< T > (this T value, T flags)
 
static T CombineFlags< T > (this IEnumerable< T > flags)
 
static string GetDescription< T > (this T value)
 
static void Write (this NetBuffer message, Point value)
 Write a Point.
 
static Point ReadPoint (this NetBuffer message)
 Read a Point.
 
static void WriteHalfPrecision (this NetBuffer message, float value)
 Write a Single with half precision (16 bits)
 
static float ReadHalfPrecisionSingle (this NetBuffer message)
 Reads a half precision Single written using WriteHalfPrecision(float)
 
static void Write (this NetBuffer message, Vector2 vector)
 Writes a Vector2.
 
static Vector2 ReadVector2 (this NetBuffer message)
 Reads a Vector2.
 
static void Write (this NetBuffer message, Vector3 vector)
 Writes a Vector3.
 
static void WriteHalfPrecision (this NetBuffer message, Vector3 vector)
 Writes a Vector3 at half precision.
 
static Vector3 ReadVector3 (this NetBuffer message)
 Reads a Vector3.
 
static Vector3 ReadHalfPrecisionVector3 (this NetBuffer message)
 Writes a Vector3 at half precision.
 
static void Write (this NetBuffer message, Vector4 vector)
 Writes a Vector4.
 
static Vector4 ReadVector4 (this NetBuffer message)
 Reads a Vector4.
 
static void WriteUnitVector3 (this NetBuffer message, Vector3 unitVector, int numberOfBits)
 Writes a unit vector (ie. a vector of length 1.0, for example a surface normal) using specified number of bits.
 
static Vector3 ReadUnitVector3 (this NetBuffer message, int numberOfBits)
 Reads a unit vector written using WriteUnitVector3(numberOfBits)
 
static void WriteRotation (this NetBuffer message, Quaternion quaternion, int bitsPerElement)
 Writes a unit quaternion using the specified number of bits per element for a total of 4 x bitsPerElements bits. Suggested value is 8 to 24 bits.
 
static Quaternion ReadRotation (this NetBuffer message, int bitsPerElement)
 Reads a unit quaternion written using WriteRotation(... ,bitsPerElement)
 
static void WriteMatrix (this NetBuffer message, ref Matrix matrix)
 Writes an orthonormal matrix (rotation, translation but not scaling or projection)
 
static void WriteMatrix (this NetBuffer message, Matrix matrix)
 Writes an orthonormal matrix (rotation, translation but no scaling or projection)
 
static Matrix ReadMatrix (this NetBuffer message)
 Reads a matrix written using WriteMatrix()
 
static void ReadMatrix (this NetBuffer message, ref Matrix destination)
 Reads a matrix written using WriteMatrix()
 
static void Write (this NetBuffer message, BoundingSphere bounds)
 Writes a bounding sphere.
 
static BoundingSphere ReadBoundingSphere (this NetBuffer message)
 Reads a bounding sphere written using Write(message, BoundingSphere)
 
static bool IsDivisibleBy (this float value, int divider)
 
static bool IsDivisibleBy (this int value, int divider)
 
static bool IsEven (this int i)
 
static bool IsOdd (this int i)
 
static Rectangle GetBorder (this Rectangle rectangle, int BorderSize)
 Returns a new Rectangle that has been grown by the 'BorderSize' amount.
 
static Rectangle GetBorder (this Rectangle rectangle, int BorderSizeX, int BorderSizeY)
 Returns a new Rectangle that has been grown by the 'BorderSize' amount.
 
static Rectangle GetBorder (this Rectangle rectangle, Point BorderSize)
 Returns a new Rectangle that has been grown by the 'BorderSize' amount.
 
static Rectangle GetBorder (this Rectangle rectangle, Vector2 BorderSize)
 Returns a new Rectangle that has been grown by the 'BorderSize' amount.
 
static Rectangle GetPaddedRectangle (this Rectangle rectangle, Vector2 Padding)
 Gets the padded rectangle.
 
static Rectangle GetPaddedRectangle (this Rectangle rectangle, Point Padding)
 Gets the padded rectangle.
 
static Rectangle GetBlurRectangle (this Rectangle rectangle, vxRenderPipeline Renderer)
 Returns the location of in the blur map.
 
static Rectangle Center (this Rectangle Inner, Rectangle Outter, float Scale=1)
 Centers a specified Inner rectangle within an Outter rectangle.
 
static Rectangle GetOffset (this Rectangle rectangle, int x, int y)
 Gets the offset rectangle.
 
static Rectangle GetOffset (this Rectangle rectangle, Point Offset)
 Gets the offset rectangle.
 
static Rectangle GetOffset (this Rectangle rectangle, Vector2 Offset)
 Gets the offset rectangle.
 
static Rectangle GetOffset (this Rectangle rectangle, int xy)
 Gets the offset rectangle.
 
static Vector2 GetIntersectionDepth (this Rectangle rectA, Rectangle rectB)
 Calculates the signed depth of intersection between two rectangles.
 
static Vector2 GetBottomCenter (this Rectangle rect)
 Gets the position of the center of the bottom edge of the rectangle.
 
static Vector2 GetAnchorPosition (this Rectangle rect, vxLayoutJustification justification)
 Gets the anchor position within the rectangle.
 
static Vector2 GetAnchorPosition (this Rectangle rect, vxLayoutJustification justification, Vector2 padding)
 Gets the padded anchor position within the rectangle.
 
static void DrawString (this SpriteBatch spriteBatch, SpriteFont font, string text, Vector2 position, Color color, float scale, vxHorizontalJustification horizontalJustification=vxHorizontalJustification.Left, vxVerticalJustification verticalJustification=vxVerticalJustification.Top, float rotation=0)
 
static void DrawString (this SpriteBatch spriteBatch, SpriteFont font, string text, Vector2 position, Color color, float scale, Vector2 origin)
 
static void DrawString (this SpriteBatch spriteBatch, SpriteFont font, string text, Vector2 position, Color color, Vector2 scale, Vector2 origin)
 
static void DrawString (this SpriteBatch spriteBatch, SpriteFont font, string text, Vector2 position, Color color, Vector2 scale)
 
static string GetClampedString (this SpriteFont Font, string text, int width)
 Returns the portion of the string within the width.
 
static string WrapString (this SpriteFont Font, string text, int Width, float scale=1)
 Wraps the string.
 
static string[] WrapStringToArray (this SpriteFont Font, string text, int Width, float scale=1)
 Wraps a String based off of the given Font and Width and returns it as an array of strings.
 
static Point GetCursorLocation (this SpriteFont Font, string text, int Width, int CursorIndex)
 A function which searches through a set of lines to see which line the cursor is on. X is the location on that line, and Y is which line it's on.
 
static string SplitIntoSentance (this string source)
 Splits the string by upper case.
 
static string ToSentanceCase (this string source)
 Converts a string into sentance case.
 
static string WrapMultilineStringBlock (this string text, int MaxCharsPerLine)
 
static string[] WrapMultilineString (this string text, int MaxCharsPerLine)
 Wraps a String based off of the given Font and Width.
 
static string ReadXML (this string Text, string XMLTag)
 Takes in a string and parses based off of the 'XML Tag'. If Tag is not found, No text is returned.
 
static string WriteXML (this string Text, string XMLTag)
 Combines Text and XML Tag into String XML Tag line.
 
static string GetFileNameFromPath (this string FilePath)
 Parses this string as a File URL and returns the File Name without the Extention.
 
static string GetParentPathFromFilePath (this string FilePath)
 Parses this string as a File Path and returns the Path Portion.
 
static void SaveToDisk (this Texture2D texture, string FileName, ImageType ImageType=ImageType.PNG)
 Saves the texture to disk.
 
static byte[] ToByteArray (this Texture2D texture)
 Converts a Texture2D to a byte array.
 
static Color[] ToColorArray (this Texture2D texture)
 Converts a Texture2D to a Color array.
 
static Texture2D ToTexture2D (this byte[] byteArray, GraphicsDevice GraphicsDevice, int Width, int Height)
 Converts a Stream of bytes into a Texture2D with the spcecified Width and Height.
 
static Texture2D Resize (this Texture2D texture, Point newSize)
 Resize a Texture to a new Width and Height.
 
static Texture2D Resize (this Texture2D texture, int NewWidth, int NewHeight)
 Resize a Texture to a new Width and Height.
 
static Texture2D Crop (this Texture2D texture, Rectangle CropRectangle)
 Crops a Portion of a Texture and returns a New Texture.
 
static float GetAspectRatio (this Texture2D texture)
 Returns the aspect ratio of this Texture2D (Width / Height)
 
static Texture2D ToVector4 (this Texture2D texture, GraphicsDevice device)
 Returns a new Texture with the SurfaceFormat converted from Color to Vector4.
 
static float[,] ToHeightMapDataArray (this Texture2D heightMap, float HeightScaleFactor=0.125f)
 Loads the Height Data from this Texture.
 
static string GetMinuteTimespanString (this TimeSpan timespan)
 Gets the Minute Values of the Time Span as a string.
 
static string GetShortenedTimespanString (this TimeSpan timespan)
 Returns a String of a Shortened Time Span.
 
static bool IsNan (this Vector3 vector)
 
static bool IsNan (this Quaternion quaternion)
 
static Point Add (this Point vectr, Point pnt1)
 Adds two different Points from each other.
 
static Point Add (this Point vectr, Point pnt1, Point pnt2)
 Adds two different Points from each other.
 
static Point Subtract (this Point vectr, Point pnt1)
 Subtracts two different Points from each other.
 
static Point Subtract (this Point vectr, Point pnt1, Point pnt2)
 Subtracts two different Points from each other.
 
static Point ToPoint (this Vector2 vector)
 Extension method which converts a Vector2 to a Point;.
 
static Vector2 ToVector2 (this Point point)
 Extension method which converts a Vector2 to a Point;.
 
static Vector2 ToLayoutScale (this Vector2 point)
 Resizes a vector2 based off of the vxLayout.Scale value.
 
static Vector2 ToIntValue (this Vector2 point)
 Converts the Vector2 X and Y components to integer values (i.e. whole numbers).
 
static Vector3 ToIntValue (this Vector3 point)
 Converts the Vector3 X, Y & Z components to integer values (i.e. whole numbers).
 
static Vector2 ToVector2 (this Vector3 vector3)
 Converts a Vector3 to a Vector2 by taking the X and Z coordinates as X and Y coordinates. This is often helpful in Height Maps.
 
static Color ToColor (this Vector3 vector3)
 
static Color ToColor (this Vector4 vector4)
 Converts a Vector4 To a Colour.
 
static Vector2 Rotate (this Vector2 vector, float radians)
 Rotates a Vector.
 
static Vector2 GetRotatedVector (this Vector2 vector, float rotation)
 Gets the rotated vector.
 
static Vector2 ProjectToScreenPosition (this GraphicsDevice graphicsDevice, Vector3 position, Matrix projection, Matrix view)
 Projects the position to screen scape and returns a Vector 2.
 

Member Function Documentation

◆ Add() [1/2]

static Point vxExtensions.Add ( this Point vectr,
Point pnt1 )
static

Adds two different Points from each other.

Parameters
vectr
pnt1
Returns

◆ Add() [2/2]

static Point vxExtensions.Add ( this Point vectr,
Point pnt1,
Point pnt2 )
static

Adds two different Points from each other.

Parameters
vectr
pnt1
pnt2
Returns

◆ Center()

static Rectangle vxExtensions.Center ( this Rectangle Inner,
Rectangle Outter,
float Scale = 1 )
static

Centers a specified Inner rectangle within an Outter rectangle.

Returns
The center.
Parameters
InnerThe Inner Rectangle to center.
OutterThe Outter Rectangle.
ScaleThe Scale to be applied to the inner rectangle when scaling.

◆ ClearFlags< T >()

static T vxExtensions.ClearFlags< T > ( this T value,
T flags )
static
Type Constraints
T :struct 

◆ CombineFlags< T >()

static T vxExtensions.CombineFlags< T > ( this IEnumerable< T > flags)
static
Type Constraints
T :struct 

◆ Crop()

static Texture2D vxExtensions.Crop ( this Texture2D texture,
Rectangle CropRectangle )
static

Crops a Portion of a Texture and returns a New Texture.

Parameters
textureTexture to Crop.
EngineReference to the Engine to access the Graphics Device and SpriteBatch.
CropRectangleThe Rectangle to Crop the Texture.
Returns
The New Cropped Texture.

◆ GetAnchorPosition() [1/2]

static Vector2 vxExtensions.GetAnchorPosition ( this Rectangle rect,
vxLayoutJustification justification )
static

Gets the anchor position within the rectangle.

Parameters
rect
justification
Returns

◆ GetAnchorPosition() [2/2]

static Vector2 vxExtensions.GetAnchorPosition ( this Rectangle rect,
vxLayoutJustification justification,
Vector2 padding )
static

Gets the padded anchor position within the rectangle.

Parameters
rect
justification
padding
Returns

◆ GetAspectRatio()

static float vxExtensions.GetAspectRatio ( this Texture2D texture)
static

Returns the aspect ratio of this Texture2D (Width / Height)

Parameters
texture
Returns

◆ GetBlurRectangle()

static Rectangle vxExtensions.GetBlurRectangle ( this Rectangle rectangle,
vxRenderPipeline Renderer )
static

Returns the location of in the blur map.

Parameters
rectangle
BorderSize
Returns

◆ GetBorder() [1/4]

static Rectangle vxExtensions.GetBorder ( this Rectangle rectangle,
int BorderSize )
static

Returns a new Rectangle that has been grown by the 'BorderSize' amount.

Parameters
rectangle
BorderSizeThe Border Size.
Returns

◆ GetBorder() [2/4]

static Rectangle vxExtensions.GetBorder ( this Rectangle rectangle,
int BorderSizeX,
int BorderSizeY )
static

Returns a new Rectangle that has been grown by the 'BorderSize' amount.

Parameters
rectangle
BorderSizeThe Border Size.
Returns

◆ GetBorder() [3/4]

static Rectangle vxExtensions.GetBorder ( this Rectangle rectangle,
Point BorderSize )
static

Returns a new Rectangle that has been grown by the 'BorderSize' amount.

Returns
The border.
Parameters
rectangleRectangle.
BorderSizeBorder size.

◆ GetBorder() [4/4]

static Rectangle vxExtensions.GetBorder ( this Rectangle rectangle,
Vector2 BorderSize )
static

Returns a new Rectangle that has been grown by the 'BorderSize' amount.

Returns
The border.
Parameters
rectangleRectangle.
BorderSizeBorder size.

◆ GetClampedString()

static string vxExtensions.GetClampedString ( this SpriteFont Font,
string text,
int width )
static

Returns the portion of the string within the width.

Returns
The string.
Parameters
FontFont.
textThis GUI Items Text.
widthWidth.

◆ GetCursorLocation()

static Point vxExtensions.GetCursorLocation ( this SpriteFont Font,
string text,
int Width,
int CursorIndex )
static

A function which searches through a set of lines to see which line the cursor is on. X is the location on that line, and Y is which line it's on.

Parameters
Font
text
Width
CursorIndex
Returns

◆ GetDescription< T >()

static string vxExtensions.GetDescription< T > ( this T value)
static
Type Constraints
T :struct 

◆ GetFileNameFromPath()

static string vxExtensions.GetFileNameFromPath ( this string FilePath)
static

Parses this string as a File URL and returns the File Name without the Extention.

Parameters
FilePath
Returns

◆ GetFlags< T >()

static IEnumerable< T > vxExtensions.GetFlags< T > ( this T value)
static
Type Constraints
T :struct 

◆ GetIntersectionDepth()

static Vector2 vxExtensions.GetIntersectionDepth ( this Rectangle rectA,
Rectangle rectB )
static

Calculates the signed depth of intersection between two rectangles.

Returns
The amount of overlap between two intersecting rectangles. These depth values can be negative depending on which wides the rectangles intersect. This allows callers to determine the correct direction to push objects in order to resolve collisions. If the rectangles are not intersecting, Vector2.Zero is returned.

◆ GetMinuteTimespanString()

static string vxExtensions.GetMinuteTimespanString ( this TimeSpan timespan)
static

Gets the Minute Values of the Time Span as a string.

Parameters
timespan
Returns

◆ GetOffset() [1/4]

static Rectangle vxExtensions.GetOffset ( this Rectangle rectangle,
int x,
int y )
static

Gets the offset rectangle.

Returns
The offset.
Parameters
rectangleRectangle.
xThe x coordinate.
yThe y coordinate.

◆ GetOffset() [2/4]

static Rectangle vxExtensions.GetOffset ( this Rectangle rectangle,
int xy )
static

Gets the offset rectangle.

Returns
The offset.
Parameters
rectangleRectangle.
xyXy coordinate offset.

◆ GetOffset() [3/4]

static Rectangle vxExtensions.GetOffset ( this Rectangle rectangle,
Point Offset )
static

Gets the offset rectangle.

Returns
The offset.
Parameters
rectangleRectangle.
OffsetOffset.

◆ GetOffset() [4/4]

static Rectangle vxExtensions.GetOffset ( this Rectangle rectangle,
Vector2 Offset )
static

Gets the offset rectangle.

Returns
The offset.
Parameters
rectangleRectangle.
OffsetOffset.

◆ GetPaddedRectangle() [1/2]

static Rectangle vxExtensions.GetPaddedRectangle ( this Rectangle rectangle,
Point Padding )
static

Gets the padded rectangle.

Returns
The padded rectangle.
Parameters
rectangleRectangle.
PaddingPadding.

◆ GetPaddedRectangle() [2/2]

static Rectangle vxExtensions.GetPaddedRectangle ( this Rectangle rectangle,
Vector2 Padding )
static

Gets the padded rectangle.

Returns
The padded rectangle.
Parameters
rectangleRectangle.
PaddingPadding.

◆ GetParentPathFromFilePath()

static string vxExtensions.GetParentPathFromFilePath ( this string FilePath)
static

Parses this string as a File Path and returns the Path Portion.

Parameters
FilePath
Returns

◆ GetRotatedVector()

static Vector2 vxExtensions.GetRotatedVector ( this Vector2 vector,
float rotation )
static

Gets the rotated vector.

Returns
The rotated vector.
Parameters
rotationRotation.

◆ GetShortenedTimespanString()

static string vxExtensions.GetShortenedTimespanString ( this TimeSpan timespan)
static

Returns a String of a Shortened Time Span.

Parameters
timespan
Returns

◆ IsFlagSet< T >()

static bool vxExtensions.IsFlagSet< T > ( this T value,
T flag )
static
Type Constraints
T :struct 

◆ ProjectToScreenPosition()

static Vector2 vxExtensions.ProjectToScreenPosition ( this GraphicsDevice graphicsDevice,
Vector3 position,
Matrix projection,
Matrix view )
static

Projects the position to screen scape and returns a Vector 2.

Returns
The to screen position.
Parameters
graphicsDeviceGraphics device.
positionPosition.
projectionProjection.
viewView.

◆ ReadXML()

static string vxExtensions.ReadXML ( this string Text,
string XMLTag )
static

Takes in a string and parses based off of the 'XML Tag'. If Tag is not found, No text is returned.

Parameters
TextText to be Parsed
XMLTagXML Tag to Parse By
Returns
Return Text parsed by XML Tags

◆ Resize() [1/2]

static Texture2D vxExtensions.Resize ( this Texture2D texture,
int NewWidth,
int NewHeight )
static

Resize a Texture to a new Width and Height.

Parameters
textureTexture to Resize.
NewWidthNew Resized Width.
NewHeightNew Resized Height.
Returns
The new Resized texture.

◆ Resize() [2/2]

static Texture2D vxExtensions.Resize ( this Texture2D texture,
Point newSize )
static

Resize a Texture to a new Width and Height.

Parameters
textureTexture to Resize.
newSizeNew Resized Point.
Returns
The new Resized texture.

◆ Rotate()

static Vector2 vxExtensions.Rotate ( this Vector2 vector,
float radians )
static

Rotates a Vector.

Parameters
vector
radians
Returns

◆ SaveToDisk()

static void vxExtensions.SaveToDisk ( this Texture2D texture,
string FileName,
ImageType ImageType = ImageType::PNG )
static

Saves the texture to disk.

Parameters
textureTexture.
FileNameFile name.

◆ SetFlags< T >() [1/2]

static T vxExtensions.SetFlags< T > ( this T value,
T flags )
static
Type Constraints
T :struct 

◆ SetFlags< T >() [2/2]

static T vxExtensions.SetFlags< T > ( this T value,
T flags,
bool on )
static
Type Constraints
T :struct 

◆ SplitIntoSentance()

static string vxExtensions.SplitIntoSentance ( this string source)
static

Splits the string by upper case.

Returns
The by upper case.
Parameters
sourceSource.

◆ Subtract() [1/2]

static Point vxExtensions.Subtract ( this Point vectr,
Point pnt1 )
static

Subtracts two different Points from each other.

Parameters
vectr
pnt1
Returns

◆ Subtract() [2/2]

static Point vxExtensions.Subtract ( this Point vectr,
Point pnt1,
Point pnt2 )
static

Subtracts two different Points from each other.

Parameters
vectr
pnt1
pnt2
Returns

◆ ToByteArray()

static byte[] vxExtensions.ToByteArray ( this Texture2D texture)
static

Converts a Texture2D to a byte array.

Parameters
texture
Returns

◆ ToColor()

static Color vxExtensions.ToColor ( this Vector4 vector4)
static

Converts a Vector4 To a Colour.

Parameters
vector4
Returns

◆ ToColorArray()

static Color[] vxExtensions.ToColorArray ( this Texture2D texture)
static

Converts a Texture2D to a Color array.

Parameters
texture
Returns

◆ ToIntValue() [1/2]

static Vector2 vxExtensions.ToIntValue ( this Vector2 point)
static

Converts the Vector2 X and Y components to integer values (i.e. whole numbers).

Returns
The int value.
Parameters
pointPoint.

◆ ToIntValue() [2/2]

static Vector3 vxExtensions.ToIntValue ( this Vector3 point)
static

Converts the Vector3 X, Y & Z components to integer values (i.e. whole numbers).

Returns
The int value.
Parameters
pointPoint.

◆ ToLayoutScale()

static Vector2 vxExtensions.ToLayoutScale ( this Vector2 point)
static

Resizes a vector2 based off of the vxLayout.Scale value.

Parameters
point
Returns

◆ ToPoint()

static Point vxExtensions.ToPoint ( this Vector2 vector)
static

Extension method which converts a Vector2 to a Point;.

Parameters
vectorThe Vector2 to Convert
Returns
The Vector as a Point.

◆ ToSentanceCase()

static string vxExtensions.ToSentanceCase ( this string source)
static

Converts a string into sentance case.

Parameters
source
Returns

◆ ToTexture2D()

static Texture2D vxExtensions.ToTexture2D ( this byte[] byteArray,
GraphicsDevice GraphicsDevice,
int Width,
int Height )
static

Converts a Stream of bytes into a Texture2D with the spcecified Width and Height.

Parameters
byteArray
GraphicsDevice
Width
Height
Returns

◆ ToVector2() [1/2]

static Vector2 vxExtensions.ToVector2 ( this Point point)
static

Extension method which converts a Vector2 to a Point;.

Parameters
pointThe Point to Convert
Returns
The Point as a Vector2.

◆ ToVector2() [2/2]

static Vector2 vxExtensions.ToVector2 ( this Vector3 vector3)
static

Converts a Vector3 to a Vector2 by taking the X and Z coordinates as X and Y coordinates. This is often helpful in Height Maps.

Parameters
vector3
Returns

◆ ToVector4()

static Texture2D vxExtensions.ToVector4 ( this Texture2D texture,
GraphicsDevice device )
static

Returns a new Texture with the SurfaceFormat converted from Color to Vector4.

Parameters
texture
deviceThe GraphicsDevice.
Returns
A new Texture with the SurfaceFormat as Vector4.

◆ WrapMultilineString()

static string[] vxExtensions.WrapMultilineString ( this string text,
int MaxCharsPerLine )
static

Wraps a String based off of the given Font and Width.

Parameters
text
Fontthe XNA/Monogame SpriteFont drawing this font.
WidthThe Bounds or Width of where the text is being drawn.
Returns

◆ WrapString()

static string vxExtensions.WrapString ( this SpriteFont Font,
string text,
int Width,
float scale = 1 )
static

Wraps the string.

Returns
The string.
Parameters
FontFont.
textThis GUI Items Text.
WidthWidth.

◆ WrapStringToArray()

static string[] vxExtensions.WrapStringToArray ( this SpriteFont Font,
string text,
int Width,
float scale = 1 )
static

Wraps a String based off of the given Font and Width and returns it as an array of strings.

Parameters
Fontthe XNA/Monogame SpriteFont drawing this font.
textThe Text to Wrap.
WidthThe Bounds or Width of where the text is being drawn.
Returns

◆ WriteXML()

static string vxExtensions.WriteXML ( this string Text,
string XMLTag )
static

Combines Text and XML Tag into String XML Tag line.

Parameters
TextText to Combine into XML Tag
XMLTagXML Tag to use
Returns
String that is XML Tagged

The documentation for this class was generated from the following files: