svgDOM Architecture

This page provides an overview on the architecture of svgDOM. For the current state please check the files in the svgDOM-package.

Package Namespace: svgDOM

file: svgDOM.tcl

Package Class-Diagram

The following diagramm gives an overview on the classes of svgDOM. To handle the path-element for use in tk::canvas also as for tkpath there are two different Path-classes:

...svgDOM::Path ........... for native use of path-element in tkpath
...svgDOM::PathFraction ... for limited use the path-element in tk::canvas

svgDOM - class diagram

svgDOM: class diagram



Package File Structure

The following structure shows the structure of the package svgDOM.

svgDOM
    ├───pkgIndex.tcl
    ├───svgDOM.tcl
    ├───lib
    │   ├───class_Circle.tcl
    │   ├───class_Ellipse.tcl
    │   ├───class_Line.tcl
    │   ├───class_Path.tcl
    │   ├───class_PathFraction.tcl
    │   ├───class_Polygon.tcl
    │   ├───class_Polyline.tcl
    │   ├───class_Rectangle.tcl
    │   ├───class_SVG.tcl
    │   ├───class_SVGElement.tcl
    │   ├───class_SVGMatrix.tcl
    │   ├───class_SVGStyle.tcl
    │   ├───super_Element.tcl
    │   ├───super_SVGPath.tcl
    │   └───super_SVGShape.tcl
    └───test
        └...


Package Classes

class: svgDOM::SVG

superclass: svgDOM::Element

file: lib/class_SVG.tcl
  • constructor {args}
  • method update {}
  • method set_id2obj {id obj}
  • method del_id2obj {id}
  • method get_by_id {id}
  • method pathType {{type {}}}
  • method exists {id}
  • method unique_id {}
  • method getExpDoc {}
  • method viewScale {}
  • method getViewBox {}
  • method getStyleScale {}
  • method getSVG {}
  • method _getBase {}

class: svgDOM::Circle

superclass: svgDOM::Ellipse

file: lib/class_Circle.tcl
  • constructor {_attrList _matrixObj {_resolution 1}}
  • method unknown {target_method args}

class: svgDOM::Ellipse

superclass: svgDOM::SVGShape

file: lib/class_Ellipse.tcl
  • constructor {_attrList _matrixObj {_resolution 1}}
  • method unknown {target_method args}
  • method parseShape {}
  • method checkSimplicity {}
  • method parsePolygon {}
  • method parseEllipse {}
  • method transform {pointList}
  • method _remove_getPolygon {{mode transformed}}

class: svgDOM::Line

superclass: svgDOM::SVGShape

file: lib/class_Line.tcl
  • constructor {_attrList _matrixObj}
  • method unknown {target_method args}
  • method parseShape {}
  • method toShapeDict {}

class: svgDOM::Path

superclass: svgDOM::SVGPath

file: lib/class_Path.tcl
  • constructor {_attrList _matrixObj}
  • method unknown {target_method args}

class: svgDOM::PathFraction

superclass: svgDOM::SVGPath

file: lib/class_PathFraction.tcl
  • constructor {_attrList _matrixObj}
  • method unknown {target_method args}
  • method get {}
  • method AbsolutePath {pathDef}
  • method SplitPath {pathDef}
  • method CreatePointList {pathDef}
  • method Path2Line {pathDef}
  • method Bezier {xy {PRECISION 10}}
  • method BezierPoint {a b c d mu}
  • method LinePoint {a b mu}
  • method TransformMatrix {valueList matrix}
  • method checkPoly__x {node}
  • method ToShapeDict {_shapeDict}

class: svgDOM::Polygon

superclass: svgDOM::SVGShape

file: lib/class_Polygon.tcl
  • constructor {_attrList _matrix}
  • method unknown {target_method args}
  • method parseShape {}
  • method toShapeDict {}

class: svgDOM::Polyline

superclass: svgDOM::SVGShape

file: lib/class_Polyline.tcl
  • constructor {_attrList _matrixObj}
  • method unknown {target_method args}
  • method parseShape {}
  • method toShapeDict {}

class: svgDOM::Rectangle

superclass: svgDOM::SVGShape

file: lib/class_Rectangle.tcl
  • constructor {_attrList _matrixObj}
  • method unknown {target_method args}
  • method parseShape {}
  • method toShapeDict {}

class: svgDOM::SVGElement

superclass: svgDOM::Element

file: lib/class_SVGElement.tcl
  • constructor {_root _parent _node}
  • method unknown {target_method args}
  • method update {}
  • method createElement {_doc _name}
  • method createElementNS {_doc _name}
  • method createSVGNode {parentNode}

class: svgDOM::SVGMatrix

file: lib/class_SVGMatrix.tcl
  • constructor {}
  • method unknown {target_method args}
  • method transform {cmdList}
  • method multiply {matrix2 {matrixOrder append}}
  • method translate {value}
  • method scale {value}
  • method rotate {value}
  • method skewX {value}
  • method skewY {value}
  • method get {}
  • method applyPointList {pointList}
  • method Matrix2Command {_matrix}

class: svgDOM::SVGStyle

file: lib/class_SVGStyle.tcl
  • constructor {{_styleScale 1}}
  • method unknown {target_method args}
  • method update {_dict}
  • method get {}

class: svgDOM::Element

file: lib/super_Element.tcl
  • constructor {_root _parent _node}
  • method unknown {target_method args}
  • method update {}
  • method buildChild {_root _parent _node args}
  • method TransformAttrToList {transformAttr}
  • method id {args}
  • method parent {args}
  • method matrix {}
  • method style {}
  • method appendChild {obj}
  • method children {args}
  • method getAttributeList {}
  • method attribute {args}
  • method report {}

class: svgDOM::SVGPath

superclass: svgDOM::SVGShape

file: lib/super_SVGPath.tcl
  • constructor {_attrList _matrixObj}
  • method unknown {target_method args}
  • method type {{mode fraction}}
  • method get {}
  • method NormalizePath {pathDef}
  • method AbsolutePath {pathDef}
  • method TransformMatrix {valueList matrix}
  • method MirrorPoint {p a}
  • method ToShapeDict {_shapeDict}

class: svgDOM::SVGShape

file: lib/super_SVGShape.tcl
  • constructor {_type _attrList _matrixObj}
  • method unknown {target_method args}
  • method transform {pointList}
  • method get {}