Monitors Class

From TouchDesigner 099 Wiki

The Monitors class describes the set of all installed monitor objects. It can be accessed with the monitors object, found in the automatically imported td module. It is a list of monitor objects, where monitors[0] is monitor 0 (0-indexed).


Members

primary (Read Only) The primary monitor display.
height (Read Only) The height of the combined monitor area, measured in pixels.
width (Read Only) The width of the combined monitor area, measured in pixels.
left (Read Only) The leftmost edge of the combined monitor area, measured in pixels.
right (Read Only) The rightmost edge of the combined monitor area, measured in pixels.
top (Read Only) The topmost position of the combined monitor area, measured in pixels.
bottom (Read Only) The bottommost position of the combined monitor area, measured in pixels.



Methods

locate(x,y)Monitor

Return the monitor at the specified mouse coordinates, or None.

Special Functions

len(Monitors)int

Returns the total number of monitors.
   a = len(monitors)

[index]Monitor

Return specific monitor given an integer index.
   v = monitors[0]

Iterator

Iterate over each monitor.
   for m in monitors:
       # do something with m