C# 클래스 OpenTK.DisplayDevice

파일 보기 프로젝트 열기: andykorth/opentk 1 사용 예제들

Private Properties

프로퍼티 타입 설명
DisplayDevice System
DisplayDevice System
FindResolution DisplayResolution

공개 메소드들

메소드 설명
ChangeResolution ( DisplayResolution resolution ) : void

Changes the resolution of the DisplayDevice.

If the specified resolution is null, this function will restore the original DisplayResolution.

ChangeResolution ( int width, int height, int bitsPerPixel, float refreshRate ) : void

Changes the resolution of the DisplayDevice.

GetDisplay ( DisplayIndex index ) : DisplayDevice

Gets the DisplayDevice for the specified DisplayIndex.

RestoreResolution ( ) : void

Restores the original resolution of the DisplayDevice.

SelectResolution ( int width, int height, int bitsPerPixel, float refreshRate ) : DisplayResolution

Selects an available resolution that matches the specified parameters.

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.

ToString ( ) : string

Returns a System.String representing this DisplayDevice.

비공개 메소드들

메소드 설명
DisplayDevice ( ) : System
DisplayDevice ( DisplayResolution currentResolution, bool primary, IEnumerable availableResolutions, Rectangle bounds, object id ) : System
FindResolution ( int width, int height, int bitsPerPixel, float refreshRate ) : DisplayResolution

메소드 상세

ChangeResolution() 공개 메소드

Changes the resolution of the DisplayDevice.
If the specified resolution is null, this function will restore the original DisplayResolution.
Thrown if the requested resolution could not be set.
public ChangeResolution ( DisplayResolution resolution ) : void
resolution DisplayResolution The resolution to set.
리턴 void

ChangeResolution() 공개 메소드

Changes the resolution of the DisplayDevice.
Thrown if the requested resolution could not be set.
public ChangeResolution ( int width, int height, int bitsPerPixel, float refreshRate ) : void
width int The new width of the DisplayDevice.
height int The new height of the DisplayDevice.
bitsPerPixel int The new bits per pixel of the DisplayDevice.
refreshRate float The new refresh rate of the DisplayDevice.
리턴 void

GetDisplay() 공개 정적인 메소드

Gets the DisplayDevice for the specified DisplayIndex.
public static GetDisplay ( DisplayIndex index ) : DisplayDevice
index DisplayIndex The that defines the desired display.
리턴 DisplayDevice

RestoreResolution() 공개 메소드

Restores the original resolution of the DisplayDevice.
Thrown if the original resolution could not be restored.
public RestoreResolution ( ) : void
리턴 void

SelectResolution() 공개 메소드

Selects an available resolution that matches the specified parameters.

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.

public SelectResolution ( int width, int height, int bitsPerPixel, float refreshRate ) : DisplayResolution
width int The width of the requested resolution in pixels.
height int The height of the requested resolution in pixels.
bitsPerPixel int The bits per pixel of the requested resolution.
refreshRate float The refresh rate of the requested resolution in hertz.
리턴 DisplayResolution

ToString() 공개 메소드

Returns a System.String representing this DisplayDevice.
public ToString ( ) : string
리턴 string