Class ScaledSize
public class ScaledSize : IComparable, IComparable<ScaledSize>, IEquatable<ScaledSize>
- Inheritance
-
ScaledSize
- Implements
- Inherited Members
- Extension Methods
Constructors
ScaledSize()
public ScaledSize()
Fields
_scale
public float _scale
Field Value
Properties
Default
public static ScaledSize Default { get; }
Property Value
HeightCut
public bool HeightCut { get; set; }
Property Value
IsEmpty
public bool IsEmpty { get; }
Property Value
Pixels
public SKSize Pixels { get; set; }
Property Value
Scale
public float Scale { get; set; }
Property Value
Units
public SKSize Units { get; set; }
Property Value
WidthCut
public bool WidthCut { get; set; }
Property Value
Methods
Clone()
public ScaledSize Clone()
Returns
CompareTo(ScaledSize)
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
public int CompareTo(ScaledSize other)
Parameters
otherScaledSizeAn object to compare with this instance.
Returns
- int
A value that indicates the relative order of the objects being compared. The return value has these meanings:
Value Meaning Less than zero This instance precedes otherin the sort order.Zero This instance occurs in the same position in the sort order as other.Greater than zero This instance follows otherin the sort order.
CompareTo(object)
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
public int CompareTo(object obj)
Parameters
objobjectAn object to compare with this instance.
Returns
- int
A value that indicates the relative order of the objects being compared. The return value has these meanings:
Value Meaning Less than zero This instance precedes objin the sort order.Zero This instance occurs in the same position in the sort order as obj.Greater than zero This instance follows objin the sort order.
Exceptions
- ArgumentException
objis not the same type as this instance.
CreateEmpty(float)
public static ScaledSize CreateEmpty(float scale)
Parameters
scalefloat
Returns
Equals(ScaledSize)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(ScaledSize other)
Parameters
otherScaledSizeAn object to compare with this object.
Returns
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object obj)
Parameters
objobjectThe object to compare with the current object.
Returns
FromPixels(SKSize, float)
public static ScaledSize FromPixels(SKSize size, float scale)
Parameters
Returns
FromPixels(float, float, bool, bool, float)
public static ScaledSize FromPixels(float width, float height, bool widthCut, bool heighCut, float scale)
Parameters
Returns
FromPixels(float, float, float)
public static ScaledSize FromPixels(float width, float height, float scale)
Parameters
Returns
FromUnits(float, float, float)
public static ScaledSize FromUnits(float width, float height, float scale)
Parameters
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
SnapToPixel(double, double)
public static float SnapToPixel(double point, double scale)
Parameters
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
WithCut(bool, bool)
public ScaledSize WithCut(bool widthCut, bool heightCut)
Parameters
Returns
Operators
operator ==(ScaledSize, ScaledSize)
public static bool operator ==(ScaledSize left, ScaledSize right)
Parameters
leftScaledSizerightScaledSize
Returns
operator !=(ScaledSize, ScaledSize)
public static bool operator !=(ScaledSize left, ScaledSize right)
Parameters
leftScaledSizerightScaledSize