[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Author Index][Subject Index]

Scaling and offset parameters in MIDAS PLOT commands



Dear MIDAS users,


Recently, I have received a number of requests to support
screen coordinates as input parameters in the various graphic
commands of MIDAS.  Although this request is simple to
implement, it actually may cause inconsistencies. These I
would like to avoid. However, I also would like to be backwards
compatible.

Below, I  briefly describe the problem  and give a possible solution
on which I would welcome your input.

With one exception, all  main plot commands contain the parameter:
       x_sc, y_sc, x_off, y_off
where
      x_sc and y_sc
are the scales in x and y, and
     x_off and y_off
are the offsets of the plot in mm in x and y  with respect  to the left
hand corner of the graphics display/device.

Currently, having  x/y_sc positive numbers  means a real
scale (in world coordinates/mm). Having a negative number
indicates the absolute size of the plot in mm. Hence, positive
numbers refers to the world coordinates system, negative
numbers refer to an absolute size (in mm). However, the
x/y_off  only accepts only positive  numbers.

If  I would now add screen coordinates as an additional possibility
for the offset I could  simply let the plot command accept negative
numbers for the screen coordinate offsets, and (as it is now) positive
numbers for the offset in mm. However, this make the system
inconsistent.
(negative number for mm sizes for x/y_sc, but positive numbers for
the offset in mm for x/y_off)

Instead, I would prefer to have negative numbers for the offset
in mm and  a positive number of the offset in screen coordinates.

In summary,  for the plot commands I intend to have:
   scales:  positive numbers refer to world coord/mm
                 negative numbers refer to mm sizes
   offsets: positive numbers refer to screen coordinates
                 negative numbers refer to mm offsets

The implementation would however not be quite backwards
compatible.  If you feel this would cause a major problem for
you or if you can think of a better solution please let me know.

Kindest regards,

Rein
--
Rein H. Warmels                                       O  \
Internet:  rwarmels@eso.org
European Southern Observatory         /_-->\(@)    Fax:
+49-89-3200 6562
Karl-Schwarzschild-Strasse 2        *##\,###\\        Voice:
+49-89-3200 6292
D 85748 Garching bei M"unchen    (O)         (O)
+49-89-3200 60
                                                   http://www.eso.org/