Svg Namespace

From FreeCAD Documentation
Revision as of 15:38, 8 January 2012 by Yorik (talk | contribs) (Created page with 'In the [http://en.wikipedia.org/wiki/Scalable_Vector_Graphics SVG] documents exported by FreeCAD's Drawing Module and used as page templates, several cu…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

In the SVG documents exported by FreeCAD's Drawing Module and used as page templates, several custom attributes are used, for FreeCAD's own use. These attributes all use the freecad: namespace prefix. The namespace URL defined in those SVG documents refers to this page:

xmlns:freecad="http://sourceforge.net/apps/mediawiki/free-cad/index.php?title=Svg_Namespace"

The above line is generally an attribute of the opening <svg> tag.

Attributes

freecad:EditableText

Defines a text in a template that can be edited by FreeCAD.

Example:

<text freecad:EditableText="MyTitleText">
    <tspan>This is a title</tspan>
</text>

freecad:basepoint1

Defines the first point of a Draft Dimension object (represented as a group in a SVG document). This attribute is used when importing the SVG fragment in FreeCAD, in order to recreate the dimension object. The group contains paths and other graphical items to correctly render the dimension object in other SVG applications.

Example:

<g freecad:basepoint1="0.5 4.34" freecad:basepoint2="2.4 5.8" dimpoint="3.2 7.76">
    <path d="...">
</g>

freecad:basepoint1

Defines the second point of a Draft Dimension object (represented as a group in a SVG document). This attribute is used when importing the SVG fragment in FreeCAD, in order to recreate the dimension object. The group contains paths and other graphical items to correctly render the dimension object in other SVG applications.

Example: see #freecad:basepoint1

freecad:dimpoint

Defines the point of a Draft Dimension object through which the dimension line passes. This attribute is used when importing the SVG fragment in FreeCAD, in order to recreate the dimension object. The group contains paths and other graphical items to correctly render the dimension object in other SVG applications.

Example: see #freecad:basepoint1