Readme for the libbsvg SVG Rendering Library. 24.6.2004 Michael Lotz Contents of this readme: Installation 1.0 Requirements 1.1 License 1.2 Installation 1.3 Sources 1.4 How to use Questions & Answers 2.0 Motivation 2.1 Why no external SVG-Renderer is needed 2.2 Relation to FAT / SVG-Tracker 2.3 Source Philisophy 2.4 Contacting me ******* Installation 1.0 Requirements This library is intended to be used on BeOS R5 and should also work on any newer version / distribution. The library uses the Expat XML-Parser to extract information from files and/or other resources. A version of libexpat is included in the packages. 1.1 License Full releases of the libbsvg are available in binary and source form. You can use either of them as you wish and may redistribute it with or without changes. I would appreciate it if you would send me any enhancements to the source you may come up with, but you do not need to do so (see section 2.4 for contact information). You can use this work in any way you want but please give credit where it is due. And remember that there is no warranty of any kind, you use the software completely at your own risk and I am not liable for anything it may do or not do. 1.2 Installation The library comes as a normal BeOS packaged. The library is installed to the appropriate place automatically. A SVG-Viewer ("bsvgviewer") is included to test the library. Just drop a SVG-File into the SVGWindow that comes up when you start the bsvgviewer. 1.3 Sources For full releases, the sources to the library and some of the distributed programs are located in the "src" directory of the installation directory. 1.4 How to use If you want to use the library in your own projects, you should take a look at the libbsvg forum at mlotz.ch. You can find tutorials and ask questions there. Actually the only thing you need to do to use libbsvg is to include the main "SVGView" header file and link to libbsvg.so. ******* Questions & Answers 2.0 Motivation This project was started as a subproject of the Tracker.NewFS to bring SVG-Support to this Tracker variation. It was then made into a project of its own and I think it is generic enough to be used in other projects as well. It follows the coding style and appearance of the Be headers and should be rather straight forward to use and include into your own projects. 2.1 Why no external SVG-Renderer is needed Opposed to previous efforts, no external SVG-Renderer (like libart or the zodius library) is used to produce the SVG-Graphics. The reason for this is simple and if you take a look at some of the Be headers (namely and ) you will realise that the BeOS was programmed with Vector Graphics in mind. The standard BView class provides allmost all the rendering functions you need to bring up a SVG 1.1 capable renderer and the BShape class perfectly fits into the concept of SVG-Paths. As the BeOS provides the rendering functions and libraries like expat provide the capability to extract the data from XML-Files, the only thing left is an "interface" - a translation between the text based SVG-Data and the BShape and BView classes. This library is intended to fill this gap and provide a native implementation of the SVG 1.1 standard published by the W3C (www.w3.org). 2.2 Relation to FAT / SVG-Tracker The starting point of the project (SVG for Tracker.NewFS) was inspired by the work done in FAT / SVG-Tracker. However this library was produced entirely by myself. It does not use any code of FAT-Tracker and it was actually programmed without any look at the code. Also the idea behind it is rather different. The FAT-Tracker is useing libart to do the SVG rendering rather than doing it natively with Be classes. That both, the FAT-Tracker and this library, use the expat library to parse XML is a coincident but it was not a hard choice given what alternatives there are on BeOS (Xercs-C++) and how perfectly the expat library fits into the concept of SVG rendering. This library is intended to do much more than just rendering. You can produce SVG-Graphics on-the-fly and the library can produce SVG-Files out of these instructions. 2.3 Source Philisophy The philisophy behind this library is to fit into the whole environment of the BeOS and provide straight forward access to SVG rendering / editing. The headers use the common style of Be headers so they should be rather easy to read for any BeOS developer. The source is written to be compact and functional but still readable at the same time. If you have problems understanding what's going on somewhere, feel free to contact me or ask in the forum (mlotz.ch). 2.4 Contacting me If you have any questions or enhancements / patchs / bugfixes / hints you can reach me by e-mail (mmlr@mlotz.ch).