Komodo Engine
C PROJECT_LOGO=
Komodo.Core.Engine.Graphics.Resolution Struct Reference

Represents a screen resolution. More...

Inheritance diagram for Komodo.Core.Engine.Graphics.Resolution:

Public Member Functions

 Resolution (int width, int height)
 
override bool Equals (object obj)
 Compares the equality of Resolution and an arbitrary type. More...
 
bool Equals (Resolution other)
 Compares the equality of Resolution and another Resolution. More...
 
override int GetHashCode ()
 Generates a hashcode from the Resolution. More...
 

Static Public Member Functions

static bool operator== (Resolution left, Resolution right)
 
Returns
Whether or not the Resolutions are equivalent.

 
static bool operator!= (Resolution left, Resolution right)
 
Returns
Whether or not the Resolutions are not equivalent.

 

Public Attributes

float AspectRatio => Height == 0 ? 0 : Width / (float)Height
 Aspect ratio of the resolution. More...
 

Properties

int Height [get]
 Height of the screen resolution. More...
 
int Width [get]
 Width of the screen resolution. More...
 

Detailed Description

Represents a screen resolution.

Constructor & Destructor Documentation

◆ Resolution()

Komodo.Core.Engine.Graphics.Resolution.Resolution ( int  width,
int  height 
)
Parameters
widthWidth of screen.
heightWidth of screen.

Member Function Documentation

◆ Equals() [1/2]

override bool Komodo.Core.Engine.Graphics.Resolution.Equals ( object  obj)

Compares the equality of Resolution and an arbitrary type.

Parameters
objObject to compare against.
Returns
Whether or not the Object is equivalent.

◆ Equals() [2/2]

bool Komodo.Core.Engine.Graphics.Resolution.Equals ( Resolution  other)

Compares the equality of Resolution and another Resolution.

Parameters
otherResolution to compare against.
Returns
Whether or not the other Resolution is equivalent.

◆ GetHashCode()

override int Komodo.Core.Engine.Graphics.Resolution.GetHashCode ( )

Generates a hashcode from the Resolution.

Returns
Summation of property hashcodes.

Member Data Documentation

◆ AspectRatio

float Komodo.Core.Engine.Graphics.Resolution.AspectRatio => Height == 0 ? 0 : Width / (float)Height

Aspect ratio of the resolution.

Property Documentation

◆ Height

int Komodo.Core.Engine.Graphics.Resolution.Height
get

Height of the screen resolution.

◆ Width

int Komodo.Core.Engine.Graphics.Resolution.Width
get

Width of the screen resolution.