def getMatrixSVG(elementNode):
 matrixSVG = MatrixSVG()
 if ('transform' not in elementNode.attributes):
  return matrixSVG
 transformWords = []
 for transformWord in elementNode.attributes['transform'].replace(')', '(').split('('):
  transformWordStrip = transformWord.strip()
  if (transformWordStrip != ''):
   transformWords.append(transformWordStrip)
 global globalGetTricomplexDictionary
 getTricomplexDictionaryKeys = globalGetTricomplexDictionary.keys()
 for (transformWordIndex, transformWord) in enumerate(transformWords):
  if (transformWord in getTricomplexDictionaryKeys):
   transformString = transformWords[(transformWordIndex + 1)].replace(',', ' ')
   matrixSVG = matrixSVG.getSelfTimesOther(globalGetTricomplexDictionary[transformWord](transformString.split()))
 return matrixSVG

def getMatrixSVG ( elementNode ) : matrixSVG = MatrixSVG ( ) if ( 'transform' not in elementNode . attributes ) : return matrixSVG transformWords = [ ] for transformWord in elementNode . attributes [ 'transform' ] . replace ( ')' , '(' ) . split ( '(' ) : transformWordStrip = transformWord . strip ( ) if ( transformWordStrip != '' ) : transformWords . append ( transformWordStrip ) global globalGetTricomplexDictionary getTricomplexDictionaryKeys = globalGetTricomplexDictionary . keys ( ) for ( transformWordIndex , transformWord ) in enumerate ( transformWords ) : if ( transformWord in getTricomplexDictionaryKeys ) : transformString = transformWords [ ( transformWordIndex + 1 ) ] . replace ( ',' , ' ' ) matrixSVG = matrixSVG . getSelfTimesOther ( globalGetTricomplexDictionary [ transformWord ] ( transformString . split ( ) ) ) return matrixSVG
get matrixsvg by svgelement .