Trolltech Home | Qt-embedded-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-embedded-interest Archive, March 2002
Calibrate file format


Message 1 in thread

/etc/pointercal contains 7 data values separated by spaces

The second and fourth values are both zero.  The seventh value is 65536, which 
is used to scale up the calculations.

(1) This is the ratio of the screen width to the device width times the 
scalar... or,

	( screen_topLeft_x - screen_bottomRight_x )
	------------------------------------------- * 65536
	( device_topLeft_x - device_bottomRight_x )

(3) This uses the ratio in (1) to calculate the screen X offset.

	65536 * screen_topLeft_x - (1) * device_topLeft_x

The remaining two values are the same ideas as above, only applied to height:

(5) is equivalent to (1), except replace "width" with "height" and "x" with "y"

(6) is equivalent to (3), except replace "width" with "height," "x" with "y," 
and "(1)" with "(5)."

The source code for writing to /etc/pointercal is in 
$QTDIR/src/kernel/qwsmouse_qws.cpp.  (See QCalibratedMouseHandler::calibrate( 
QWSPointerCalibrationData *cd ) for this information )

I'm CC:'ing this e-mail to the qt-embedded-interest mailing list since someone 
might find it interesting, and since I'd asked earlier and not received a 
response (I'm going to assume because nobody who had time to respond knew, and 
not because it was an idiotic question, although generally the latter 
assumption is safer whenever I'm involved.)

-- 
 [ signature omitted ]