Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]

GET_SCREEN_SIZE


Syntax | Return Value | Arguments | Keywords | Examples | Version History

The GET_SCREEN_SIZE function returns size, measured in device units, of the screen.

Syntax

Result = GET_SCREEN_SIZE( [Display_name] [, RESOLUTION=variable] )

X Windows Keywords: [, DISPLAY_NAME=string]

Return Value

Returns a two-element vector of the form [width, height] that represents the dimensions, measured in device units, of the screen

Arguments

Display_name (X Only)

A string indicating the name of the X Windows display that should be used to determine the screen size.

Keywords

DISPLAY_NAME (X Only)

Set this keyword equal to a string indicating the name of the X Windows display that should be used to determine the screen size. Setting this keyword is equivalent to setting the optional Display_name argument.

RESOLUTION

Set this keyword equal to a named variable that will contain a two-element vector, [xresyres], specifying the screen resolution in cm/pixel.

Examples

You can find the dimensions and screen resolution of your screen by entering the following:

dimensions = GET_SCREEN_SIZE(RESOLUTION=resolution) 
PRINT, dimensions, resolution 

For the screen on which this was tested, IDL prints:

1280.00      1024.00 
0.0282031    0.0281250 

Version History

Introduced: 5.0


Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]