svgDOM

svgDOM is a svg library free and openSource software project to prepare svg-files to be used in tk::canvas. svgDOM is a library to deal with svg files and to prepare them for use in tk::canvas ot tkpath and was developed as a part of rattleCAD or especially in cad4tcl.
So let me tell you about the background of this library:

rattleCAD & cad4tcl

rattleCAD offers a library of bicycle parts to render complete bicycles. These libraries are provided as svg files. While svg may contain path elements, the tk::canvas is not able to render native path elements.
cad4tcl provides an application that gives you a GUI-app to open and convert svg-files into a readable format for tk::canvas or tkpath.

Features

With svgDOM path elements are converted into a set of polylines and polygons and groups them inside a group-element. Of course, this group of polylines and polygons can not really replace the path element, but at least this feature offers a way to represent it.
In addition svgDOM collects all transformations and style information along the parent groups of a node and transfers this information absolutely into to the graphics element. At least the exported svg-file file does not contain any transform attributes.
svgDOM currently provides the following features:

  • converts path-element to a set of polygon- and polyine-elements
  • transfers all transform information absoulutely to the graphic node
  • transfers all style information to the graphic node
  • export svg for use in tk::canvas or tkpath

External libraries

cad4tcl at least requires some external packages to provide its features:

  • TclOO
  • math (part of tcllib)
  • math::geometry (part of tcllib)
  • tdom

Projects & Repositories @ sourceforge.net

The svgDOM project is hosted on sourceforge.net

related projects

... feel free to participate!