XRandR
From Wikipedia, the free encyclopedia
XRandR is a simple library designed to interface the X Resize and Rotate Extension. This allows clients to change the size and rotation of the root window of a screen, along with the ability to reflect the screen about either axis (if supported by the implementation). Rotation and reflection may be implemented by software and may result in slower performance if rotation and reflection are implemented in this fashion (as are all implementations as of October 2002).
The XRandR library does some minimal caching to avoid roundtrips to provide clients frequently used information. See "The X Resize and Rotate Extension" for a detailed description; also note that depth switching, as described in the initial paper, is not and may never be implemented, as display memory is growing rapidly, and toolkits are already beginning to support migration, mitigating the need for depth switching. If it is implemented in the future, it is expect to be done via an upward compatible extension to the current library/protocol; functionality described in the original paper should continue to work.
Rotation and reflection and how they interact can be confusing. In Randr, the coordinate system is rotated in a counter-clockwise direction relative to the normal orientation. Reflection is along the window system coordinate system, not the physical screen X and Y axis, so that rotation and reflection do not interact. The other way to consider reflection is to is specified in the "normal" orientation, before rotation, if you find the other way confusing.