|
The Open Toolkit library
1.0
|
Defines a display device on the underlying system, and provides methods to query and change its display parameters. More...
Public Member Functions | |
| DisplayResolution | SelectResolution (int width, int height, int bitsPerPixel, float refreshRate) |
| Selects an available resolution that matches the specified parameters. More... | |
| void | ChangeResolution (DisplayResolution resolution) |
| Changes the resolution of the DisplayDevice. More... | |
| void | ChangeResolution (int width, int height, int bitsPerPixel, float refreshRate) |
| Changes the resolution of the DisplayDevice. More... | |
| void | RestoreResolution () |
| Restores the original resolution of the DisplayDevice. More... | |
| override string | ToString () |
| Returns a System.String representing this DisplayDevice. More... | |
Static Public Member Functions | |
| static DisplayDevice | GetDisplay (DisplayIndex index) |
| Gets the DisplayDevice for the specified DisplayIndex. More... | |
Properties | |
| Rectangle | Bounds [get, set] |
| Gets the bounds of this instance in pixel coordinates.. More... | |
| int | Width [get] |
| Gets a System.Int32 that contains the width of this display in pixels. More... | |
| int | Height [get] |
| Gets a System.Int32 that contains the height of this display in pixels. More... | |
| 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. More... | |
| float | RefreshRate [get, set] |
| Gets a System.Single representing the vertical refresh rate of this display. More... | |
| bool | IsPrimary [get, set] |
| Gets a System.Boolean that indicates whether this Display is the primary Display in systems with multiple Displays. More... | |
| IList< DisplayResolution > | AvailableResolutions [get, set] |
| Gets the list of DisplayResolution objects available on this device. More... | |
| static IList< DisplayDevice > | AvailableDisplays [get] |
| Gets the list of available DisplayDevice objects. This function allocates memory. More... | |
| static DisplayDevice | Default [get] |
| Gets the default (primary) display of this system. More... | |
Defines a display device on the underlying system, and provides methods to query and change its display parameters.
| void OpenTK.DisplayDevice.ChangeResolution | ( | DisplayResolution | resolution | ) |
Changes the resolution of the DisplayDevice.
| resolution | The resolution to set. DisplayDevice.SelectResolution |
| Graphics.GraphicsModeException | Thrown if the requested resolution could not be set. |
If the specified resolution is null, this function will restore the original DisplayResolution.
| void OpenTK.DisplayDevice.ChangeResolution | ( | int | width, |
| int | height, | ||
| int | bitsPerPixel, | ||
| float | refreshRate | ||
| ) |
Changes the resolution of the DisplayDevice.
| width | The new width of the DisplayDevice. |
| height | The new height of the DisplayDevice. |
| bitsPerPixel | The new bits per pixel of the DisplayDevice. |
| refreshRate | The new refresh rate of the DisplayDevice. |
| Graphics.GraphicsModeException | Thrown if the requested resolution could not be set. |
|
static |
Gets the DisplayDevice for the specified DisplayIndex.
| index | The DisplayIndex that defines the desired display. |
| void OpenTK.DisplayDevice.RestoreResolution | ( | ) |
Restores the original resolution of the DisplayDevice.
| Graphics.GraphicsModeException | Thrown if the original resolution could not be restored. |
| DisplayResolution OpenTK.DisplayDevice.SelectResolution | ( | int | width, |
| int | height, | ||
| int | bitsPerPixel, | ||
| float | refreshRate | ||
| ) |
Selects an available resolution that matches the specified parameters.
| width | The width of the requested resolution in pixels. |
| height | The height of the requested resolution in pixels. |
| bitsPerPixel | The bits per pixel of the requested resolution. |
| refreshRate | The refresh rate of the requested resolution in hertz. |
If a matching resolution is not found, this function will retry ignoring the specified refresh rate, bits per pixel and resolution, in this order. If a matching resolution still doesn't exist, this function will return the current resolution.
A parameter set to 0 or negative numbers will not be used in the search (e.g. if refreshRate is 0, any refresh rate will be considered valid).
This function allocates memory.
| override string OpenTK.DisplayDevice.ToString | ( | ) |
Returns a System.String representing this DisplayDevice.
|
staticget |
Gets the list of available DisplayDevice objects. This function allocates memory.
|
getset |
Gets the list of DisplayResolution objects available on this device.
|
getset |
Gets a System.Int32 that contains number of bits per pixel of this display. Typical values include 8, 16, 24 and 32.
|
getset |
Gets the bounds of this instance in pixel coordinates..
|
staticget |
Gets the default (primary) display of this system.
|
get |
Gets a System.Int32 that contains the height of this display in pixels.
|
getset |
Gets a System.Boolean that indicates whether this Display is the primary Display in systems with multiple Displays.
|
getset |
Gets a System.Single representing the vertical refresh rate of this display.
|
get |
Gets a System.Int32 that contains the width of this display in pixels.