OpenTK.DisplayResolution Class Reference

Contains information regarding a monitor's display resolution. More...

List of all members.

Public Member Functions

override string ToString ()
 Returns a System.String representing this DisplayResolution.
override bool Equals (object obj)
 Determines whether the specified resolutions are equal.
override int GetHashCode ()
 Returns a unique hash representing this resolution.

Static Public Member Functions

static bool operator== (DisplayResolution left, DisplayResolution right)
 Compares two instances for equality.
static bool operator!= (DisplayResolution left, DisplayResolution right)
 Compares two instances for inequality.

Properties

Rectangle Bounds [get]
 Gets a System.Drawing.Rectangle that contains the bounds of this display device.
int Width [get, set]
 Gets a System.Int32 that contains the width of this display in pixels.
int Height [get, set]
 Gets a System.Int32 that contains the height of this display in pixels.
int BitsPerPixel [get, set]
 Gets a System.Int32 that contains number of bits per pixel of this display. Typical values include 8, 16, 24 and 32.
float RefreshRate [get, set]
 Gets a System.Single representing the vertical refresh rate of this display.

Detailed Description

Contains information regarding a monitor's display resolution.

Definition at line 18 of file DisplayResolution.cs.


Member Function Documentation

override bool OpenTK.DisplayResolution.Equals ( object  obj  ) 

Determines whether the specified resolutions are equal.

Parameters:
obj The System.Object to check against.
Returns:
True if the System.Object is an equal DisplayResolution; false otherwise.

Definition at line 164 of file DisplayResolution.cs.

00165         {
00166             if (obj == null) return false;
00167             if (this.GetType() == obj.GetType())
00168             {
00169                 DisplayResolution res = (DisplayResolution)obj;
00170                 return
00171                     Width == res.Width &&
00172                     Height == res.Height &&
00173                     BitsPerPixel == res.BitsPerPixel &&
00174                     RefreshRate == res.RefreshRate;
00175             }
00176 
00177             return false;
00178         }

override int OpenTK.DisplayResolution.GetHashCode (  ) 

Returns a unique hash representing this resolution.

Returns:
A System.Int32 that may serve as a hash code for this resolution.

Definition at line 186 of file DisplayResolution.cs.

00187         {
00188             return Bounds.GetHashCode() ^ bits_per_pixel ^ refresh_rate.GetHashCode();
00189         }

static bool OpenTK.DisplayResolution.operator!= ( DisplayResolution  left,
DisplayResolution  right 
) [static]

Compares two instances for inequality.

Parameters:
left The first instance.
right The second instance.
Returns:
True, if left does not equal right; false otherwise.

Definition at line 219 of file DisplayResolution.cs.

00220         {
00221             return !(left == right);
00222         }

static bool OpenTK.DisplayResolution.operator== ( DisplayResolution  left,
DisplayResolution  right 
) [static]

Compares two instances for equality.

Parameters:
left The first instance.
right The second instance.
Returns:
True, if left equals right; false otherwise.

Definition at line 203 of file DisplayResolution.cs.

00204         {
00205             if (((object)left) == null && ((object)right) == null)
00206                 return true;
00207             else if ((((object)left) == null && ((object)right) != null) ||
00208                      (((object)left) != null && ((object)right) == null))
00209                 return false;
00210             return left.Equals(right);
00211         }

override string OpenTK.DisplayResolution.ToString (  ) 

Returns a System.String representing this DisplayResolution.

Returns:
A System.String representing this DisplayResolution.

Definition at line 152 of file DisplayResolution.cs.

00153         {
00154             return String.Format("{0}x{1}@{2}Hz", Bounds, bits_per_pixel, refresh_rate);
00155         }


Property Documentation

int OpenTK.DisplayResolution.BitsPerPixel [get, set]

Gets a System.Int32 that contains number of bits per pixel of this display. Typical values include 8, 16, 24 and 32.

Definition at line 122 of file DisplayResolution.cs.

Rectangle OpenTK.DisplayResolution.Bounds [get]

Gets a System.Drawing.Rectangle that contains the bounds of this display device.

Definition at line 90 of file DisplayResolution.cs.

int OpenTK.DisplayResolution.Height [get, set]

Gets a System.Int32 that contains the height of this display in pixels.

Definition at line 111 of file DisplayResolution.cs.

float OpenTK.DisplayResolution.RefreshRate [get, set]

Gets a System.Single representing the vertical refresh rate of this display.

Definition at line 135 of file DisplayResolution.cs.

int OpenTK.DisplayResolution.Width [get, set]

Gets a System.Int32 that contains the width of this display in pixels.

Definition at line 100 of file DisplayResolution.cs.

 All Classes Functions Variables Enumerations Properties Events

Generated on Tue Mar 9 14:59:12 2010 for The Open Toolkit library by  doxygen 1.6.1