MODULE Unit; (* Defines constants and procedures for various units of length. The lengths are defined in terms of the units of Juno's coordinate system, which are PostScript points (equal to 1/72 of an inch). *) CONST In = 72.0, Ft = In * 12.0, Cm = In / 2.54, Mm = Cm / 10.0; (* "In", "Ft", "Cm", and "Mm" are the size (in points) of one inch, one foot, one centimeter, and one millimeter, respectively. *) (* Juno's coordinate system uses screen-independent units, but there are cases in which screen-dependent units could be useful. This is most often the case when PostScript output is not being generated, and it is important that the quantization error induced by the discrete pixels on the screen not effect the regularity of the drawing. For example, it would be more convenient to use screen-dependent units to draw a series of evenly-spaced horizontal lines. The following procedure can be used to obtain the screen-dependent size of a single pixel. *) PROC x, y := Pixel() IS SKIP END; (* "x" and "y" are the horizontal and vertical size (in points) of a pixel on the screen on which Juno is running. Use this procedure in your Juno programs with care, since it will cause your program to be screen-dependent. *)