Dr Andrew C Aitchison writes:
 > 
 > Are you sure you actually want the problem solved anyway ?
 > We have a laptop with a 125dpi screen and a lecture room projector
 > with about 8dpi.
 > If I were to make it run a two screen desktop, and my slide viewer
 > honoured the true screen DPI, on one screen 12pt letters would be
 > 20 pixels tall, and on the other they would be about one pixel.
 > 

This illustrates how useless the screen size is to determine the
'felt' DPI ie. the resolution the user really feels.

To calculate this value (and that is what should really matter) we 
have to make a number of assumptions:
1. The user adjusts his display so that he can view it comfortably, 
   that is he places it at a distance to his eyes that he can view 
   the entire screen without head and with very little eye movement.
2. There is a certain horizontal and vertical angle within which
   objects appear sharp and with sufficient details to the human
   eye.
   If we review literature about workplace ergonomy we may find an
   average value for these vision angles.
3. When we read (from paper) we adjust the paper so that it is at
   a comfortable viewing distance. If we place it closer to our eyes
   it will overstrain the muscles that focus the lense if we place
   it too far away the text will become too hard to read.
   For all people with normal sight (or using corrective devices to
   restore normal sight) this distance is approximately the same.
   There should be more or less agreed upon value in literature also.
4. When we view a document on the computer screen we want it to appear
   at approximately the same vision angle as we read the same document
   from paper.
   
Using assumption 2. and 3. we can calculate the size of the vision
field at the 'comfortable reading distance':

q_h, q_v := horizontal/vertical vision angle
d := 'comfortable' reading distance
h,v := horizontal/vertical dimension of vision field

 h = 2 * d * tan(q_h/2)
 v = 2 * d * tan(q_v/2)

>From assumption 1 and 4 it is immediately clear that to obtain a
roughly equal viewing angle for documents viewed on the computer
screen and on paper we need to use these values to determine the 
DPI.
The horizontal/vertical display ratio of a computer screen is 
approximately 4/3 in most cases. 
Assuming that

 h/v > 4/3

Therefore the vertical screen size will determine the distance
of the screen to the eyes. 
With:
D_h, D_v := horizontal/vertical size of the computer screen

we can therefore calculate the 'felt' screen dimensions like:

 v_s = v
 h_s = v * D_h / D_v
  
Applications are passed the screen dimensions and the virtual pixel
dimensions.
Thus we should correct the screen sizes passed to the application:
To do this we can either use the physical pixel size used at server
startup time or the one that's used at the time the application is
started.

With:

r_h, r_v := physical pixel size
r_h_virt, r_v_virt := pixel size of the virtual screen

 v_s' = v_s * r_v_virt / r_v
 h_s' = h_s * r_h_virt / r_h

These should be the screen dimension values passed in the connection 
block.

So far we have dealt with idnividual screens. The Xinerama case
needs to be treated a little differently.

The personal preferences of the user may deviate from the 'normed'
values of the viewing angles and comfortable reading distance.
Furthermore the user may want only a portion of the screen to appear
in his 'viewing area'. 
Since all relationships above are linear a single scaling factor
Will suffice to allow the user to adjust things for is personal
preferences.


XINERAMA
========

Here we must distinguish two uses:

1. The desktop
2. The video wall

1. Desktop
==========

Xinerama knows abbout a single rectangle screen with no holes.
It therefore doesn't make much sense to combine screens with
different resolutions as the screen will contain unviewable
areas. We should also assume that the user uses displays of
similar physical dimensions or at least places the displays
in a way that he can view them under the same viewing angle.

At the same time we assume that the user views an application
window on a single screen. To view windows on the other screen
the user will move his eyes or head.
Therefore the calculated resolution should be the same as the
one of a single head. We therefore need to 'rescale' the screen
dimensions passed in the connection block:

With
r_h_virt, r_v_virt := pixel size of the Xinerama virtual screen
r_h_virt1, r_v_virt1 := pixel size of the virtual screen of the first head

we get:

v_s'' = v_s' * r_v_virt / r_v_virt1
h_s'' = h_s' * r_h_virt / r_h_virt1


2. Video Wall
=============

As the viewer is expected to view the entire screen at once the
calculation is similar to the single desktop.

To calculate the 'felt' horizontal dimension one needs to obtain
D_h and D_v. if we assume that identical screens are used with
the virtual pixel size equal to the physical size desktops are 
used we can do:

D_h = D_h_1 * r_h_virt1 / r_h_virt
D_v = D_v_1 * r_v_virt1 / r_v_virt

D_h_1, D_v_1 := horizontal/vertical size of the first screen.


Egbert.
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to