home *** CD-ROM | disk | FTP | other *** search
- DF_Render DrawFile display program
- (for testing DrawUtilsA and DrawFile modules)
-
- (Version 1.00 Aug 1995 : RISC OS 3 only)
-
- by James McQueen
-
-
- PURPOSE
- This application was written to test the new transformation facility of the
- DrawUtilsA module, which is an alternative to the DrawFile module (both do
- most of the work of displaying a drawfile). For comparison purposes the
- program can also use the DrawFile module.
-
- Which module is used depends on the variable dua_module% which is declared
- at the start of the !RunImage program. If non-zero the DrawUtilsA module is
- used (module calls are made from PROCprocess_file1 and PROCrender_image1),
- otherwise the DrawFile module is used by calls from PROCprocess_file2 and
- PROCrender_image2. Remember to load the DrawFile module if necessary.
-
- If the DrawUtilsA module is used, any unknown fonts used in the drawfile are
- automatically replaced by Homerton.Medium (replace_font$ defined in
- PROCinit_variables) by a call to PROCauto_replace_ unknown_fonts made from
- PROCprocess_file1. A message is displayed when this occurs. The required
- changes to the drawfile are actually made by the module.
-
-
- USING THE PROGRAM
- DF_Render does not install on the icon bar but opens a blank image window
- when started. To display a drawfile just drag its icon into the window.
-
- The window is re-sized if necessary when the drawfile is loaded and the
- image is always centered in the window work area.
-
- A rectange with tags around its edge (the 'grid') also appears centered in
- the work area; this is used to control scaling and rotation of the image by
- dragging on the tags with the select button held down. The tag initially at
- the bottom right (shown as an open circle) determines rotation and the other
- corner tags affect x- and y-scaling simultaneously. The mid-point tags on
- the vertical sides affect only x-scaling and those on the horizontal sides
- only y-scaling.
-
- The scale values are set to 1.0 and the rotation to zero when a drawfile is
- loaded.
-
- The program allows scale values in the range 0.05 - 10. If dragging would
- reduce a scale value below 0.05 it changes to -0.05 and will then become
- more negative (to a limit of -10) if the drag is continued in the same
- direction. Thus the image can be flipped about its horizontal, vertical or
- both axes. This works best if the pointer is moved slowly as the scale
- factor(s) are about to change sign.
-
- For more precise control of image transformation, click menu over the image
- window and select 'View...'. This opens the view control dialogue box.
-
- At the top of the dialogue box are three writeable icons for x- and
- y-scaling and rotation (in degrees). As above, the scale values can be in
- the range 0.05 - 10 or -0.05 - -10. Below these are a number of icons as
- follows:
-
- Proportional grid: If enabled, the grid size is proportional to the current
- image size after x- and y-scaling. Otherwise the grid size depends (almost)
- logarithmically on the x- and y-scale factors. The first allows more
- accurate control of scaling over the whole of the allowable range, and the
- second allows gives more rapid rescaling but with a loss of accuracy.
-
- Grid colour: The grid colour can be changed or the grid can be switched off
- if not required.
-
- Lock pointer: If enabled, the pointer is continuously re-positioned over the
- grid control tag as the drag operation proceeds. This gives more accurate
- control of scaling and rotation but requires more mouse movement. Otherwise
- more rapid changes in scaling and rotation are produced but with a loss of
- accuracy.
-
- Window size: The image window (work area) size is determined when the
- drawfile is loaded, but does not change automatically with rescaling or
- rotation. Instead, the window size can be set to that corresponding to one
- of the standard paper 'A' sizes (e.g. A4 landscape = 2104 x 1488 os units).
- The image is always centered in the window work area whatever size is
- selected.
-
- Changes made in the view control dialogue box do not take effect until 'OK'
- is clicked. 'Cancel' restores the previous settings.
-
-