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 ()
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()
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 ()