Skip to content

Class TransformConverter

Definition

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

String converter for the Transform type.

public class TransformConverter : 
    StardewUI.Framework.Converters.IValueConverter<string, StardewUI.Graphics.Transform>, 
    StardewUI.Framework.Converters.IValueConverter

Inheritance
Object ⇦ TransformConverter

Implements
IValueConverter<string, Transform>, IValueConverter

Remarks

Valid strings must be a semicolon-separated list of one of the valid transform properties, followed by a colon, followed by the property value.

Valid property names include: translate, translateX, translateY, rotate, scale, scaleX and scaleY.

The value following each property should be a number, except for translate and scale which should be a Vector2 compatible string such as 2, -4 instead. Rotation values are interpreted as instead of radians for improved readability.

Members

Constructors

Name Description
TransformConverter()

Methods

Name Description
Convert(string) Converts a value from the source type to the destination type.

Details

Constructors

TransformConverter()

public TransformConverter();

Methods

Convert(string)

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

public StardewUI.Graphics.Transform Convert(string value);
Parameters

value   string
The value to convert.

Returns

Transform