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, SVG 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. All of the 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 5.10 or later); Qt 5 should be included as standard in most Linux distros, or it is available from qt.io. The older Qt 3 or 4 will not work with the current version.

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.

The latest version also uses the KDE Frameworks libraries (version 5.68 or later) to provide desktop integration. Frameworks 5 should also be included as standard in most Linux distros, or it is available from kde.org.

For reasonable text display, a good selection of scalable 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).



The current version of DrawView is built using CMake, available from cmake.org. After cloning the Git repository or downloading and unpacking a source archive, change to the source directory and build and install the application by doing:
    # Clone the source repository from GitHub
    git clone https://github.com/martenjj/drawview.git
    cd drawview
    git checkout frameworks5
    # Generate the required configuration files and scripts
    mkdir BUILD
    cd BUILD
    cmake ..
    # Now follow the standard build steps.
    make install
    # The applicatuon is now ready to run.
    drawview [file...]
Along with the DrawView program this automatically installs desktop integration, MIME types etc.

Older versions of DrawView, in particular the Qt-only branch 'qt5', are built using GNU autotools. After cloning the Git repository or downloading and unpacking a source archive, change to the source directory and build and install the application by doing:

    git checkout qt5
    autoreconf -i
    ./configure [OPTIONS...]
    sudo make install

There are some OPTIONS that it may be necessary to give to 'configure' in order to install desktop integration. 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 where it was installed is included in PATH) using the command:
    drawview [FILES...]

or, assuming that 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.

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.
Quit Close the current window, and exit the application if there are no others.
View Actual Size Display the drawing at the original scale.
Zoom In
Zoom Out
Zoom the drawing. This can also be done by holding down the CTRL key and scrolling with the mouse wheel. If the drawing is larger than the view then it can be moved around using the scroll bars or by dragging it with the left mouse button.
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).
Library Object If an object library is being displayed, select the library object that is to be shown. Exporting or printing will also use this object.
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.
Configure... This is not currently implemented because there aren't any preferences options.
Help    About...       Version information and contact details for the application.

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
Object libraryDrawLib (810)DrawPlus, Vector

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 and Frameworks), 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 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 raise an issue on GitHub or mail me; I will try to answer to the best of my knowledge or assist in any other way possible.

[Home Page] Home         Page by Jonathan Marten