Пример #1
0
 def __init__ (self, **attr):
     PositionableElement.__init__ (self, name = 'path', **attr)
     if attr.has_key ('transform'):
         self.postTransform = attr['transform']
     else:
         self.postTransform = None
     self.elements = []
     self.closed = False
Пример #2
0
 def __init__(self, **attr):
     PositionableElement.__init__(self, name='path', **attr)
     if attr.has_key('transform'):
         self.postTransform = attr['transform']
     else:
         self.postTransform = None
     self.elements = []
     self.closed = False
Пример #3
0
 def __init__(self, radius, start, delta, **attr):
     PositionableElement.__init__(self, name='path', **attr)
     self.radius = radius
     if delta < 0:
         delta = -delta
         start -= delta
     self.point1 = self.arcPoint(start)
     self.point2 = self.arcPoint(start + delta)
Пример #4
0
 def __init__ (self, radius, start, delta, **attr):
     PositionableElement.__init__ (self, name = 'path', **attr)
     self.radius = radius
     if delta < 0:
         delta = -delta
         start -= delta
     self.point1 = self.arcPoint (start)
     self.point2 = self.arcPoint (start + delta)
Пример #5
0
 def __init__(self, **attr):
     PositionableElement.__init__(self, name='line', **attr)
     if attr.has_key('point1'):
         self.point1 = V(*attr['point1'])
     else:
         self.point1 = V(0.0, 0.0)
     if attr.has_key('point2'):
         self.point2 = V(*attr['point2'])
     else:
         self.point2 = V(0.0, 0.0)
Пример #6
0
 def __init__ (self, **attr):
     PositionableElement.__init__ (self, name = 'line', **attr)
     if attr.has_key ('point1'):
         self.point1 = VStruct (*attr['point1'])
     else:
         self.point1 = VStruct (0.0, 0.0)
     if attr.has_key ('point2'):
         self.point2 = VStruct (*attr['point2'])
     else:
         self.point2 = VStruct (0.0, 0.0)
Пример #7
0
 def __init__(self, **attr):
     Grouping.__init__(self, **attr)
     PositionableElement.__init__(self, **attr)
     if attr.has_key('text'):
         self.text = attr['text']
     else:
         self.text = ''
     if attr.has_key('textHeight'):
         self.textHeight = attr['textHeight']
     else:
         self.textHeight = 10
     if attr.has_key('verticalAnchor'):
         self.verticalAnchor = attr['verticalAnchor']
     else:
         self.verticalAnchor = 'top'
     if attr.has_key('horizontalAnchor'):
         self.horizontalAnchor = attr['horizontalAnchor']
     else:
         self.horizontalAnchor = 'left'
     self.width = 0
     self.height = 0
     self.createText()
Пример #8
0
 def __init__ (self, **attr):
     Grouping.__init__ (self, **attr)
     PositionableElement.__init__ (self, **attr)
     if attr.has_key ('text'):
         self.text = attr['text']
     else:
         self.text = ''
     if attr.has_key ('textHeight'):
         self.textHeight = attr['textHeight']
     else:
         self.textHeight = 10
     if attr.has_key ('verticalAnchor'):
         self.verticalAnchor = attr['verticalAnchor']
     else:
         self.verticalAnchor = 'top'
     if attr.has_key ('horizontalAnchor'):
         self.horizontalAnchor = attr['horizontalAnchor']
     else:
         self.horizontalAnchor = 'left'
     self.width = 0
     self.height = 0
     self.createText ()
Пример #9
0
 def __init__ (self, **attr):
     Grouping.__init__ (self, **attr)
     PositionableElement.__init__ (self, **attr)
     if attr.has_key ('text'):
         self.text = attr['text']
     else:
         self.text = ''
     if attr.has_key ('lineLength'):
         self.lineLength = attr['lineLength']
     else:
         self.lineLength = float ('inf')
     if attr.has_key ('maxLines'):
         self.maxLines = attr['maxLines']
     else:
         self.maxLines = float ('inf')
     if attr.has_key ('textHeight'):
         self.textHeight = attr['textHeight']
     else:
         self.textHeight = 10
     if attr.has_key ('verticalAnchor'):
         self.verticalAnchor = attr['verticalAnchor']
     else:
         self.verticalAnchor = 'top'
     if attr.has_key ('horizontalAnchor'):
         self.horizontalAnchor = attr['horizontalAnchor']
     else:
         self.horizontalAnchor = 'left'
     if attr.has_key ('direction'):
         self.direction = attr['direction']
     else:
         self.direction = 'back'
     self.width = 0
     self.height = 0
     self.current = self.x
     self.currentLine = self.y
     self.maxLen = 0
     self.numLines = 1
     self.createText ()
Пример #10
0
 def __init__(self, **attr):
     PositionableElement.__init__(self, name='circle', **attr)
     if attr.has_key('radius'):
         self.radius = attr['radius']
     else:
         self.radius = 0.0
Пример #11
0
 def __init__ (self, **attr):
     PositionableElement.__init__ (self, name = 'circle', **attr)
     if attr.has_key ('radius'):
         self.radius = attr['radius']
     else:
         self.radius = 0.0