Struct ImageSize
[Serializable]
public readonly struct ImageSize : IStringWrapper, IEquatable<ImageSize>
- Implements
-
IStringWrapperIEquatable<ImageSize>
Constructors
ImageSize(int, int)
public ImageSize(int width, int height)
Parameters
widthintheightint
ImageSize(string)
public ImageSize(string value)
Parameters
valuestring
Fields
Auto
public const string Auto = "auto"
Field Value
- string
R1024x1024
public const string R1024x1024 = "1024x1024"
Field Value
- string
R1024x1536
public const string R1024x1536 = "1024x1536"
Field Value
- string
R1024x1792
public const string R1024x1792 = "1024x1792"
Field Value
- string
R128x128
public const string R128x128 = "128x128"
Field Value
- string
R1536x1024
public const string R1536x1024 = "1536x1024"
Field Value
- string
R16x16
public const string R16x16 = "16x16"
Field Value
- string
R1792x1024
public const string R1792x1024 = "1792x1024"
Field Value
- string
R256x256
public const string R256x256 = "256x256"
Field Value
- string
R32x32
public const string R32x32 = "32x32"
Field Value
- string
R512x512
public const string R512x512 = "512x512"
Field Value
- string
R64x64
public const string R64x64 = "64x64"
Field Value
- string
Properties
IsLandscape
public bool IsLandscape { get; }
Property Value
- bool
IsPortrait
public bool IsPortrait { get; }
Property Value
- bool
IsSquare
public bool IsSquare { get; }
Property Value
- bool
Value
public string Value { get; }
Property Value
- string
Methods
Equals(ImageSize)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(ImageSize other)
Parameters
otherImageSizeAn object to compare with this object.
Returns
Equals(object)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand this instance are the same type and represent the same value; otherwise, false.
GetDisplayedValues(string)
public static Dictionary<string, string> GetDisplayedValues(string modelId)
Parameters
modelIdstring
Returns
- Dictionary<string, string>
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
GetSupportedImageSizes(string)
public static string[] GetSupportedImageSizes(string modelId)
Parameters
modelIdstring
Returns
- string[]
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
TryAdjustValue(string, string, out string)
public static bool TryAdjustValue(string modelId, string selectedValue, out string adjustedValue)
Parameters
modelIdstringselectedValuestringadjustedValuestring
Returns
- bool
Operators
implicit operator string(ImageSize)
public static implicit operator string(ImageSize size)
Parameters
sizeImageSize
Returns
- string
implicit operator ImageSize(string)
public static implicit operator ImageSize(string value)
Parameters
valuestring