home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 5
/
DATAFILE_PDCD5.iso
/
utilities
/
d
/
drawprint
/
!DrawPrint
/
!Help
next >
Wrap
Text File
|
1995-01-28
|
12KB
|
230 lines
DrawPrint DrawFile view/print utility
(Version 1.01 28 Jan 1995)
PURPOSE
This application is a DrawFile viewer and printing utility which allows
replacement of unknown fonts in the DrawFile and which provides a number of
print options, including the ability to print an image too large to fit on
one page segmentally (i.e. across several pages).
This application was written in Basic primarily to test and demonstrate the
DrawUtilsA module, which is an alternative to the Acorn DrawFile module but
with some extra facilities. The DrawUtilsA module and two documentation
files ('DUAmodInfo' and 'DUAmodSWIs') can be found inside the application
directory. Another Basic program ('NoWimpDemo') shows how to display and
print drawfiles in a non-Wimp program.
DrawPrint requires RISC OS 3.1 or later, and a suitable printer driver
must be installed in order for it to print DrawFiles.
Copyright Notice: This software is copyright © of the author (James McQueen)
1995. However, you are free to give this software to anyone you wish via any
medium including electronic bulletin board or public domain (PD) library
providing it is delivered with this documentation file unaltered. You may
not sell this software, except that PD libraries may make a nominal charge
to cover magnetic media and postage.
GETTING STARTED
To use DrawPrint, double-click on its icon in a directory viewer to install
the application on the icon bar. To display a DrawFile, drag its icon onto
the DrawPrint icon on the icon bar. Once the image window is open, a
DrawFile can also be loaded by dragging its icon into the image window
(replacing the previous image).
ICON BAR OPTIONS
Clicking menu over the icon bar icon will display a menu with four entries.
These are:
Info
Move right across the 'Info' arrow to open the standard information window.
Font options
This leads to a dialogue box which determines the action taken on loading a
DrawFile containing unknown fonts. There are three choices:
- 'Auto replace': unknown fonts are automatically replaced with a font
selected by clicking on the menu icon at the right of the dialogue box.
This will produce a menu listing the fonts available on your computer.
When the replacement is made (on loading a DrawFile), a message of the
form "replacing font: unknown with replacement" is displayed. You will
then be given the option of displaying or discarding the DrawFile.
- 'User select replace': if this option is selected, a dialogue box will
appear on loading a DrawFile containing unknown fonts. This is described
below, and allows a replacement for each unknown font to be selected.
- 'No action': a warning message is displayed if the DrawFile contains
unknown fonts, but otherwise no action is taken. You will then be given
the option of displaying or discarding the DrawFile.
The 'Font options' dialogue box provides a fourth option - 'Compile font
table'. The font table appears near the start of the DrawFile and provides a
list of the fonts it uses. Fonts used in text objects or transformed text
objects must appear in the font table, but fonts used only in text area
objects need not. Some programs which generate DrawFiles do not include the
latter in the font table, and other programs list many fonts whether or not
they are actually used in the DrawFile. If this option is enabled, the font
table will be properly updated whether or not any font substitution has been
made.
Some printers (e.g. PostScript devices) work more efficiently if a list of
fonts required is provided before printing starts. DrawPrint will perform
this font down-loading if appropriate, using the font table to generate the
list. Therefore, if you are using a PostScript or similar printer, the
'Compile font table' option should be enabled.
Configure
This leads to a small dialogue box containing a single 'OK' icon. Clicking
on this icon will save the current DrawPrint setup to disc to be used as the
default configuration. This sets the zoom factor for the image window, the
action for handling unknown fonts (and compiling the font table), and the
method used to print the DrawFile.
Quit
Selecting this option will remove DrawPrint from the icon bar.
LOADING A DRAWFILE
To display a DrawFile, drag its icon onto the DrawPrint icon on the icon
bar. If the image window is open, a DrawFile can also be loaded by dragging
its icon into the window (this will replace the previous image).
With the exception of unknown fonts, any error found in the DrawFile is
reported as a textual message followed by a string of the form "[code = xxx;
tag = xxx; position = xxx; offset = xxx]". Code is the error code on which
the textual message is based. Tag is the tag type of the object containing
the error (e.g. 1 = text object, 2 = path object). Position is the location
of the object in bytes from the start of the file. Offset is the location of
the error-causing sequence in bytes from the start of the object. No offset
value is given if the location of the error-causing sequence can be
determined from the error code.
If the DrawFile contains unknown fonts and the 'User select replace' option
was chosen, the image window is closed and the 'Change font' dialogue box
is displayed. DrawPrint makes a list of the unknown fonts, numbering them
1, 2, 3... etc. Each font appears only once in the list irrespective of the
number of times it is used in the DrawFile. The number of unknown fonts
appears at the top of the dialogue box, and initially the first unknown font
is displayed alongside its number. The 'Back' and 'Next' icons can be used
to cycle through the list. To select a replacement font, click on the menu
icon to obtain a menu of fonts available and choose one. The 'Replace all'
icon will substitute the displayed replacement font for the currently listed
unknown font and those remaining in the list. It is not necessary to choose
a replacement font for each unknown one (in which case the default action as
used by Draw will be performed when displaying the image). When the
selections have been made, click on the 'OK' icon to perform the font
replacement and display the DrawFile. At any point, clicking on the 'Cancel'
icon will end the dialogue and discard the DrawFile.
When displaying a DrawFile containing unknown fonts, the actions are: for a
text object - the system font is used; for a transformed text object -
nothing is displayed; for a text area object - if the unknown font appears
at the start of the text then nothing is displayed, otherwise the previous
font is used.
Clicking the menu button over the image window displays a menu with four
entries. These are:
Info
This leads to a dialogue box containing some information about the DrawFile.
If font substitution has been performed then the file will be shown as
modified (an asterisk also appears after the file name in the image window
title bar).
Save
This leads to a standard save file dialogue box. Either click on the 'OK'
icon, press return or drag the icon to a directory viewer to save the
DrawFile (after changing its name if necessary).
Zoom
This leads to a dialogue box in which the zoom factor for the screen display
can be set. Type values for the multiplier and divisor into the writable
icons (only single digits in the range 1-8 can be entered) or use the arrow
icons to alter the values. Press return a second time or click on the 'Set'
icon to rescale the image. The zoom factor can be vary from 1/8th to 8 times
the normal screen display size for the image.
Print
Selecting this option will display the print control dialogue box. This is
described below.
PRINTING
In the upper part of the print control dialogue box, you can enter the
number of copies (1 - 999) to be printed using the writable icon or change
the displayed value using the arrow icons. You can also choose whether or
not DrawPrint pauses between pages.
In the middle section of the window, you can set the scale at which the
image is printed as a percentage of its 'normal' size and choose one of four
print modes ('Normal', 'Rotate', 'Auto-fit' and 'Segmental'). In some cases
a modifier ('Centre' or 'Crop marks') can