Struct Resolution
- Namespace
- Cobilas.GodotEngine.Utility
- Assembly
- com.cobilas.godot.utility.dll
Stores information about a screen resolution.
[Serializable]
public readonly struct Resolution : IEquatable<Resolution>, IEquatable<Vector2D>, IEquatable<Vector2DInt>, IEquatable<Vector2>, IEquatable<int>
- Implements
-
IEquatable<Vector2>
- Inherited Members
Constructors
Resolution(in Vector2D, in int)
Starts a new instance of the object.
public Resolution(in Vector2D resolution, in int frequency)
Parameters
Resolution(in Vector2DInt, in int)
Starts a new instance of the object.
public Resolution(in Vector2DInt resolution, in int frequency)
Parameters
resolution
Vector2DIntScreen resolution.
frequency
intScreen frequency.
Resolution(in Vector2, in int)
Starts a new instance of the object.
public Resolution(in Vector2 resolution, in int frequency)
Parameters
resolution
Vector2Screen resolution.
frequency
intScreen frequency.
Resolution(in int, in int, in int)
Starts a new instance of the object.
public Resolution(in int width, in int height, in int frequency)
Parameters
width
intThe width of the screen.
height
intThe height of the screen.
frequency
intScreen frequency.
Resolution(in float, in float, in int)
Starts a new instance of the object.
public Resolution(in float width, in float height, in int frequency)
Parameters
width
floatThe width of the screen.
height
floatThe height of the screen.
frequency
intScreen frequency.
Properties
Frequency
Screen frequency.
public int Frequency { get; }
Property Value
- int
Returns the frequency of this resolution.
Height
The height of the screen.
public float Height { get; }
Property Value
- float
Returns the width of this resolution.
Width
The width of the screen.
public float Width { get; }
Property Value
- float
Returns the height of this resolution.
Methods
Equals(Vector2D)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(Vector2D other)
Parameters
other
Vector2DAn object to compare with this object.
Returns
Equals(Vector2DInt)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(Vector2DInt other)
Parameters
other
Vector2DIntAn object to compare with this object.
Returns
Equals(Resolution)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(Resolution other)
Parameters
other
ResolutionAn object to compare with this object.
Returns
Equals(Vector2)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(Vector2 other)
Parameters
other
Vector2An object to compare with this object.
Returns
Equals(int)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(int other)
Parameters
other
intAn 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
obj
objectThe object to compare with the current instance.
Returns
- bool
true if
obj
and this instance are the same type and represent the same value; otherwise, false.
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.
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
Operators
operator ==(Resolution, Resolution)
Indicates whether this instance is equal to another instance of the same type.
public static bool operator ==(Resolution A, Resolution B)
Parameters
A
ResolutionObject to be compared.
B
ResolutionObject of comparison.
Returns
- bool
Returns the result of the comparison.
explicit operator Vector2D(Resolution)
Explicit conversion operator.(Resolution to Vector2D)
public static explicit operator Vector2D(Resolution R)
Parameters
R
ResolutionObject to be converted.
Returns
explicit operator Vector2DInt(Resolution)
Explicit conversion operator.(Resolution to Vector2DInt)
public static explicit operator Vector2DInt(Resolution R)
Parameters
R
ResolutionObject to be converted.
Returns
explicit operator Vector2(Resolution)
Explicit conversion operator.(Resolution to Godot.Vector2)
public static explicit operator Vector2(Resolution R)
Parameters
R
ResolutionObject to be converted.
Returns
- Vector2
explicit operator int(Resolution)
Explicit conversion operator.(Resolution to int)
public static explicit operator int(Resolution R)
Parameters
R
ResolutionObject to be converted.
Returns
operator !=(Resolution, Resolution)
Indicates whether this instance is different from another instance of the same type.
public static bool operator !=(Resolution A, Resolution B)
Parameters
A
ResolutionObject to be compared.
B
ResolutionObject of comparison.
Returns
- bool
Returns the result of the comparison.