Hello,

Here is a patch for the xrandr manpage to describe with more precision
the --transform option, which, as Bernard noted, was rather vague.

It's against git head.
See you,
Eric
>From 6a2d2a9d33c8fbdb2cbf4aea50fe0424efa07983 Mon Sep 17 00:00:00 2001
From: Eric Piel <e...@triangle.(none)>
Date: Sun, 3 Jan 2010 00:40:19 +0100
Subject: [PATCH] xrandr: add more information about the transform option in the 
manpage

Add information about the transformation, stating it's a homogeneous
coordinate transformation, with formula provided by Bernard Siaud, and
an example of keystone shaping generated using the algorithm found in
xkeystone.

Signed-off-by: Eric Piel <[email protected]>
---
 xrandr.man |   36 +++++++++++++++++++++++++++++-------
 1 files changed, 29 insertions(+), 7 deletions(-)

diff --git a/xrandr.man b/xrandr.man
index 1fceeb6..cbc8049 100644
--- a/xrandr.man
+++ b/xrandr.man
@@ -158,13 +158,29 @@ d e f
 .br
 g h i
 .RE
-The transformation matrix multiplied by a coordinate vector of a pixel of the
-output (extended to 3 values) gives the approximate coordinate vector of a 
pixel
-in the graphic buffer. Typically, \fIa\fP and
+The transformation is based on homogeneous coordinates. The matrix multiplied
+by the coordinate vector of a pixel of the output gives the approximate
+coordinate vector of a pixel in the graphic buffer.  More precisely, the vector
+of the output pixel is extended to 3 values, with 1 as the Z coordinate, and
+the final vector of the buffer pixel is scaled so that its Z coordinate is 1.
+In other words, the coordinates of the buffer pixel are:
+.RS 
+ (a b)(x)+(c)
+.br
+ (d e)(y) (f)
+.br
+──────────────
+.br
+((g h)(x)+1)·i
+.br
+      (y)
+.RE
+Typically, \fIa\fP and
 \fIe\fP corresponds to the scaling on the X and Y axes, \fIc\fP and \fIf\fP
-corresponds to the tranlastion on those axes, and \fIg\fP, \fIh\fP, and \fIi\fP
-are respectively 0, 0 and 1. It also allows to express a rotation of an angle T
-with:
+corresponds to the translation on those axes, and \fIg\fP, \fIh\fP, and \fIi\fP
+are respectively 0, 0 and 1. The matrix can also be used to express more
+complex transformations such as keystone shaping, or rotation.  For a
+rotation of an angle T, this formula can be used:
 .RS 
 cos T  -sin T   0
 .br
@@ -313,8 +329,14 @@ big VGA screen display the surrounding of the mouse at 
normal size.
 .RS 
 xrandr --fb 3200x2000 --output LVDS --scale 2.5x2.5 --output VGA --pos 0x0 
--panning 3200x2000+0+0/3200x2000+0+0/64/64/64/64
 .RE
+.PP
+Displays the VGA output in keystone shape so that it is projected correctly
+when the beamer is slightly above the screen:
+.RS 
+xrandr --fb 1024x768 --output VGA --transform 
1.24,0.16,-124,0,1.24,0,0,0.000316,1
+.RE
 .SH "SEE ALSO"
-Xrandr(3), cvt(1)
+Xrandr(3), cvt(1), xkeystone(1)
 .SH AUTHORS
 Keith Packard,
 Open Source Technology Center, Intel Corporation.
-- 
1.6.6

_______________________________________________
xorg-devel mailing list
[email protected]
http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to