# Path: drawingDimensioning/py3_helpers.py
# def map(function, arg):
#     return list(_map(function, arg))


import numpy
from numpy import sin, cos, dot
from drawingDimensioning.py3_helpers import map
                i = i - 1
            p1 = h.find('"', p)
            p2 = h.find('"', p1+1)
            self.parms[key] = h[p1+1:p2]
            p = self.header.find('=', p+1)
        #print(self.parms)

    def rootNode(self):
        if self.parent is None:
            return self
        else:
            return self.parent.rootNode()
        

    def prettify(self, indent='', indentIncrease='  '):
        if len(self.children) == 0:
            return indent + self.header + self.footer
        else:
            return indent + self.header + '\n' + '\n'.join([c.prettify( indent+indentIncrease ) for c in self.children]) + '\n' + indent + self.footer

    def __repr__(self):
        return self.prettify()

    def applyTransforms(self, x, y):
        R = numpy.eye(2)
        r_o = numpy.zeros(2)
        tx, ty = 0, 0
        sx, sy = 1.0, 1.0
        if 'transform=' in self.header:
            if 'rotate(' in self.header:

# Path: drawingDimensioning/py3_helpers.py
# def map(function, arg):
#     return list(_map(function, arg))


# Path: drawingDimensioning/XMLlib.py
import numpy
from numpy import sin, cos, dot
from drawingDimensioning.py3_helpers import map

                i = i - 1
            p1 = h.find('"', p)
            p2 = h.find('"', p1+1)
            self.parms[key] = h[p1+1:p2]
            p = self.header.find('=', p+1)
        #print(self.parms)

    def rootNode(self):
        if self.parent is None:
            return self
        else:
            return self.parent.rootNode()
        

    def prettify(self, indent='', indentIncrease='  '):
        if len(self.children) == 0:
            return indent + self.header + self.footer
        else:
            return indent + self.header + '\n' + '\n'.join([c.prettify( indent+indentIncrease ) for c in self.children]) + '\n' + indent + self.footer

    def __repr__(self):
        return self.prettify()

    def applyTransforms(self, x, y):
        R = numpy.eye(2)
        r_o = numpy.zeros(2)
        tx, ty = 0, 0
        sx, sy = 1.0, 1.0
        if 'transform=' in self.header:
            if 'rotate(' in self.header:

                rotateParms = map(float, extractParms(self.header, 0, 'rotate(', ', ', ')'))