Skip to content

Class Vector2Converter

Definition

Namespace: StardewUI.Framework.Converters
Assembly: StardewUI.dll

String converter for the XNA Vector2 type.

public class Vector2Converter : 
    StardewUI.Framework.Converters.IValueConverter<string, Microsoft.Xna.Framework.Vector2>, 
    StardewUI.Framework.Converters.IValueConverter

Inheritance
Object ⇦ Vector2Converter

Implements
IValueConverter<string, Vector2>, IValueConverter

Members

Constructors

Name Description
Vector2Converter()

Methods

Name Description
Convert(string) Converts a value from the source type to the destination type.
Parse(ReadOnlySpan<Char>) Parses a Vector2 from a comma-separated value pair.

Details

Constructors

Vector2Converter()

public Vector2Converter();

Methods

Convert(string)

Converts a value from the source type to the destination type.

public Microsoft.Xna.Framework.Vector2 Convert(string value);
Parameters

value   string
The value to convert.

Returns

Vector2


Parse(ReadOnlySpan<Char>)

Parses a Vector2 from a comma-separated value pair.

public static Microsoft.Xna.Framework.Vector2 Parse(ReadOnlySpan<System.Char> value);
Parameters

value   ReadOnlySpan<Char>
The string value.

Returns

Vector2

The parsed Vector2.