def processSVGElementellipse(svgReader, xmlElement):
 attributeDictionary = xmlElement.attributeDictionary
 center = euclidean.getComplexDefaultByDictionaryKeys(complex(), attributeDictionary, 'cx', 'cy')
 radius = euclidean.getComplexDefaultByDictionaryKeys(complex(), attributeDictionary, 'rx', 'ry')
 if ((radius.real == 0.0) or (radius.imag == 0.0)):
  print 'Warning, in processSVGElementellipse in svgReader radius is zero in:'
  print attributeDictionary
  return
 global globalNumberOfCirclePoints
 global globalSideAngle
 loop = []
 rotatedLoopLayer = svgReader.getRotatedLoopLayer()
 for side in xrange(globalNumberOfCirclePoints):
  unitPolar = euclidean.getWiddershinsUnitPolar((float(side) * globalSideAngle))
  loop.append((center + complex((unitPolar.real * radius.real), (unitPolar.imag * radius.imag))))
 rotatedLoopLayer.loops += getTransformedFillOutline(loop, xmlElement, svgReader.yAxisPointingUpward)

def processSVGElementellipse ( svgReader , xmlElement ) : attributeDictionary = xmlElement . attributeDictionary center = euclidean . getComplexDefaultByDictionaryKeys ( complex ( ) , attributeDictionary , 'cx' , 'cy' ) radius = euclidean . getComplexDefaultByDictionaryKeys ( complex ( ) , attributeDictionary , 'rx' , 'ry' ) if ( ( radius . real == 0.0 ) or ( radius . imag == 0.0 ) ) : print 'Warning, in processSVGElementellipse in svgReader radius is zero in:' print attributeDictionary return global globalNumberOfCirclePoints global globalSideAngle loop = [ ] rotatedLoopLayer = svgReader . getRotatedLoopLayer ( ) for side in xrange ( globalNumberOfCirclePoints ) : unitPolar = euclidean . getWiddershinsUnitPolar ( ( float ( side ) * globalSideAngle ) ) loop . append ( ( center + complex ( ( unitPolar . real * radius . real ) , ( unitPolar . imag * radius . imag ) ) ) ) rotatedLoopLayer . loops += getTransformedFillOutline ( loop , xmlElement , svgReader . yAxisPointingUpward )
process elementnode by svgreader .