screenxyabs

SCREEN X-Y ABSolute coordinates.

Contents

Syntax

newxy = screenxyabs(monitor,xy) 

Description

Calculates absolute screen coordinates from the relative monitor screen coordinates. This function simplifies the use of multiple monitors in Matlab through the use of relative coordinates for each monitor.

"newxy" is a vector of xy pairs (pixels) calculated for each input xy pair.

"monitor" is a number associated with each number (Default=1). Monitor numbering is defined as the row number of the corresponding monitor in the root property 'MonitorPositions'. "xy" is a vector of xy coordinate pairs (pixels) relative to the monitor's origin (1,1) which is the coordinate of the monitor's lower left corner.

See also SCREENXYMON.M for calculation of relative coordinates. 

Uses getmondim.m.

Examples:

y=screenxyabs(2,[1,1]);
y=screenxyabs(2,[1,1,1024,768]);