DrawView: Open Source Draw File Viewer Software

System Requirements

DrawView - Draw File Viewer for Linux/Unix/Qt

DrawView allows Draw files created by the Acorn/RiscOS application Draw, and other compatible applications, to be displayed on a Linux or other Unix system (and possibly others). Drawings can be exported in PDF or PostScript format for printing or use in other applications. It is written in C++ and released under the GNU GPL.
Drawing by Hans Rijnen from the original Vector release - view full size screenshot (antialiased) or original file The full repertoire of objects - view full size screenshot
(see also Vector displaying the same file on RiscOS, and object types annotated).


System Requirements

The application can be compiled and installed on any Linux or other Unix-like system with X11. Apart from the Qt library, all the other prerequisites should be included as standard in any Linux distribution; they may need to be built and installed separately on other systems.

DrawView requires the Qt libraries (version 4.1.0 or later); Qt 4 should now be included as standard in most Linux distros, or it is available from qt.io. The older Qt 3 will not work, and DrawView has not been ported to the newer Qt 5 yet.

Qt is free for use and development of open-source applications (now on all patforms). It may in theory be possible to run DrawView under Windows or MacOS using the appropriate Qt package.

For reasonable text display, a good selection of TrueType fonts should be installed. If not installed as standard, it may be possible to copy some useful fonts from a Windows machine (you should check the legality of this before doing so).



DrawView is built and installed in the same way as most other open-source applications. After cloning the Git repository or downloading and unpacking the source archive, change to the source directory and configure and install the application by doing:
   $ autoreconf -i
   $ ./configure [OPTIONS...]
   $ make
   $ sudo make install

Some useful OPTIONS that it may be necessary to give to 'configure' are:

    --prefix=DIRECTORY         Base DIRECTORY for the installation, default is /usr/local.
    --with-qt4=LOCATION         The LOCATION where the Qt 4 library is installed (containing the bin, include and lib subdirectories). If not specified, this is searched for on PATH, in /usr/qt/4 and /usr/lib/qt4, and in prefix.
    --with-kde=yes         Install KDE desktop integration (application, icons and MIME types); this is the default if its kde-config program is found on PATH. Specify --with-kde=LOCATION to install to a different place, or --with-kde=no to not install anything.
    --with-desktop=yes         Install freedesktop/GNOME desktop integration (application and icons); this is the default if the KDE integration is not installed. Specify --with-desktop=LOCATION to install to a different place (the default is /usr/share), or --with-desktop=no to not install anything.

There are some other, less useful, options; use 'configure --help' to list them.

See the INSTALL file within the source archive for extremely detailed installation instructions.


Using DrawView

Once the application is built and installed as above, it can be run from the shell (make sure the directory prefix/bin is included in PATH) using the command:
   $ drawview [FILES...]

or, if the desktop integration was installed, by running it from the application menu or by opening a RiscOS drawing in the file manager or web browser (currently KDE only).

The options available from the application menus are:

     File    Open...       Open a file selection dialogue to load a drawing file.
Export... Open a save dialogue to export the drawing in either PDF or PostScript format, at the current page size and orientation. At the moment only single page export is supported, but it may be possible to print multiple pages or at a different scale using another application (for example, Adobe Acrobat for PDF).
Dump Decode and display the original Draw file structure on standard output.
Close Close the current window only.
Quit Close all open windows and exit the application.
View    Zoom       Submenu to change the viewing zoom factor.
Clipping Enable/disable view clipping. When on (the default), objects are clipped to the visible window while redrawing; this improves performance. When off, all of the objects are drawn regardless of whether they are visible or not; this slows down redrawing, but may give better results if the bounding boxes are not set correctly in the drawing file (some applications don't set them properly). If parts of objects appear to be missing or not drawn correctly, then try turning this option off.
Antialiasing Enable/disable antialiasing (smoothing of edges) for paths, which improves the display especially of diagonal lines - compare an antialiased screenshot against the same without. This option is on by default, but can be very slow for complex files; if performance is a problem, antialiasing can be turned off.
Bounding boxes Enable/disable display of object bounding boxes (green rectangles). Useful for checking whether the bounding boxes are set correctly in the original file.
Skeleton objects Enable/disable display of skeleton objects (light blue rectangles).
Settings    Page Size...       Set the viewing page size and orientation. Normally this will be set automatically from the drawing bounding box, but if this is not set correctly or if the page size is non-standard then one can be selected here.
Preferences... This is not currently implemented because there aren't any.
Help    About DrawView...       Version information and contact details for the application.
About Qt... Version information and contact details for the library.

Some example files are installed in the directory prefix/share/drawview/examples; this will be at /usr/local/share/drawview/examples if using the default configuration.

The mapping between the original Acorn font names and available fonts is configurable. To extend or change this, edit the file prefix/share/drawview/fontmap; this will be at /usr/local/share/drawview/fontmap by default. See the comments at the top of the file for details.

Sprite images in "old" format (8bpp or less) can only be loaded if they are in a known screen mode - this is needed to find the depth and resolution of the sprite. To add details of a new mode, edit the file prefix/share/drawview/modes; this will be at /usr/local/share/drawview/modes by default.



The file formats supported, and their original RiscOS file types, are:

      File TypeApplications
Plain Draw fileDrawFile (AFF)Draw, many others
Draw file with extra dataDrawFile (AFF)DrawPlus
Compressed Draw fileCmprDraw (C4B)Chameleon, Poster, Vector
Compressed or uncompressed, with new objects and extra dataVecFile (C56)Vector
Draw file with tagged objectsPoster (CC3)Poster

It may also be possible to load any other sort of file that uses the Draw format and tagged objects. The contents are detected by the type word at the start of the file; the file name and extension are not significant.

All of the standard Draw objects, and the additional ones provided by Vector, are supported and displayed. There are some features that it is not possible to reproduce exactly, due to limitations in the Qt library or the underlying platform, but the results obtained should be as close as it is possible to achieve. These are:

Lines with different start and end caps, or triangular caps
These are not supported directly by Qt. If lines with such caps are found in the file, the caps are drawn explictly; these may give slightly inaccurate results (see the example file 'AllCaps').

Text in "System Font"
This has metrics completely different to outline fonts. It should appear, but possibly in the wrong size.

Complex dash patterns
These were not supported directly by Qt before version 4.1. At present only the built-in dash patterns are used.

Text area layout
Sometimes line breaks and even column breaks can appear in different places to where they would happen on RiscOS. This is a result of the different font metrics between platforms; there is not much that can be done about this (but see the TODO file for possibilities).

Soft hyphen ("\-" in text area)
These are not supported by the Qt document layout classes, and are ignored.

Special RiscOS characters
The characters in the range 128..159 (decimal) are defined and displayable on RiscOS, but have no equivalent on other platforms. Where possible, these are substituted with alternative characters or a sequence. See the function DrawUtil::substituteRiscosSpecialChars in the file app/misc.cpp for those applied.

Settings objects (Draw or DrawPlus/Vector)
These are ignored.

Text background (text object, or "\B" in text area)
Text background blending is always used (as with RiscOS Select IIRC); these settings are ignored.

Underlining ("\U" in text area)
Variable underline thickness and positioning is not supported by Qt. All underlining appears in a standard style and size.

Vertical moves ("\V" in text area)
Arbitrary vertical positioning within layout is not supported by Qt. Vertical moves used to create subscripts and superscripts generate those text effects, in a standard style and size.

Text in non-integer point sizes (objects or areas)
This is not supported by Qt; text size is rounded to the nearest point size.



The DrawView source is now available from GitHub at https://github.com/martenjj/drawview. You can clone the Git repository or download a release archive from there.

The repository contains all that is necessary to build the application (apart from Qt), desktop integration support, and some example files.

DrawView at GitHub


Contact and Further Information

This is a work in progress; further facilities and improvements are planned. Reasonable suggestions, bug or problem reports are welcome. See the application's "About" box or the bottom of this page for contact information, and the TODO file within the distribution archive for possible future enhancements.

There isn't much else to document at the moment, apart from the source itself which is fairly well commented. If there is any more technical information that you need or queries that you have, then please feel free to mail me; I will try to answer to the best of my knowledge or assist in any other way possible.

[Home Page] Home         [Mail Me] Mail Page by Jonathan Marten
Last modified: Tue Dec 8 11:08:53 GMT 2015