screenxymon

SCREEN X-Y MONitor coordinates.

Contents

Syntax

newxy = screenxymon(monitor,xy) 

Description

Calculates relative screen coordinates for the monitor from the absolute 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 absolute xy coordinate pairs (pixels) which are relative to the lower left corner of the primary monitor (1,1).

See also SCREENXYABS.M for calculation of absolute coordinates.

Uses getmondim.m.

Examples:

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