simpsonst / draw2svg

Converter from RISC OS !Draw to SVG
GNU General Public License v2.0
1 stars 0 forks source link

Draw2SVG Converter

draw2svg is a RISC OS command to convert RISC OS Draw files to Scalable Vector Graphics (SVGs).

This is a RISC OS program for converting RISC OS Drawfiles to Scalable Vector Graphics (SVG) files. It should be 32-bit ready.

Contact Steven Simpson for discussion of this program. For further updates, see the website.

Installation from RISC OS binary

Copy the supplied !Boot directory over your own !Boot. It adds a file to !Boot.Library so that you can use draw2svg at the command line.

Files

Only the !Boot.Library.draw2svg binary is functionally necessary.

File type

You might wish to add these to your boot sequence:

Set File$Type_AAD SVG
DOSMap SVG SVG

Source dependencies

The code is known to compile with GCCSDK. CSWIs is required to provide the symbolic SWI names. lynx and markdown commands are required to build the plain-text version of this documentation.

Installation from source

The source is meant to be cross-compiled from Linux, using GCCSDK, for example. It ultimately builds a ZIP which contains the directory structure for installation on RISC OS.

The makefile attempts to read from config.mk in the same directory, then from draw2svg-env.mk in the search path (which can be set with -I on the command line, or by setting the environment variable MAKEFLAGS). If you have GCCSDK installed in ~/.local/opt/gccsdk, and the dependencies compiled and installed in ~/.local/opt/riscos-devel, you could put this in config.mk:

RISCOS_PREFIX=$(HOME)/.local/opt/riscos-devel
GCCSDK=$(HOME)/.local/opt/gccsdk

CPPFLAGS += -static
APPTYPE=ff8
APPTYPE=e1f

APPCP=$(GCCSDK)/cross/arm-unknown-riscos/bin/elf2aif
ELF2AIF=$(APPCP)
CMHG=$(GCCSDK)/cross/bin/cmunge
CC=$(GCCSDK)/cross/bin/arm-unknown-riscos-gcc
CXX=$(GCCSDK)/cross/bin/arm-unknown-riscos-g++
AR=$(GCCSDK)/cross/bin/arm-unknown-riscos-ar
AS=$(GCCSDK)/cross/bin/arm-unknown-riscos-as
RANLIB=$(GCCSDK)/cross/bin/arm-unknown-riscos-ranlib

ARCHIVE_DIR=$(RISCOS_PREFIX)/export
RISCOS_ZIP=$(GCCSDK)/env/bin/zip -,
UNZIP=$(GCCSDK)/env/bin/unzip

PREFIX=$(RISCOS_PREFIX)
LDFLAGS += -L$(RISCOS_PREFIX)/lib
CPPFLAGS += -I$(RISCOS_PREFIX)/include

Then you can compile with:

make

This builds out/draw2svg-riscos.zip, which can be unpacked on RISC OS for installation.

If you do this:

make install

It will install the files directly in $(PREFIX)/apps. You can use this to make the program directly available to an emulator or physical machine that can access that directory.

Usage

Either use the command line:

draw2svg [options] <infile> <outfile>

or use the !ComndCTRL configuration file Draw2SVG.Extras.draw2svg for a WIMP front-end.

Options include:

<units> are pt (points), in (inches), mm (millimetres), or cm (centimetres).

Scaling is performed first, then the margin is added, then the background is added.

Features

Converts:

To do