def process(self): x, y, width, height, origin = self.getAttributeValues( select=('x', 'y', 'width', 'height', 'origin'), valuesOnly=True) flows = flowable.Flow(self.element, self.parent) flows.process() self.parent.flow.append( StoryPlaceFlowable(x, y, width, height, origin, flows))
def process(self): x, y, width, height = self.getAttributeValues(select=('x', 'y', 'width', 'height'), valuesOnly=True) y += height flows = flowable.Flow(self.element, self.parent) flows.process() canvas = attr.getManager(self, interfaces.ICanvasManager).canvas for flow in flows.flow: flowWidth, flowHeight = flow.wrap(width, height) if flowWidth <= width and flowHeight <= height: y -= flowHeight flow.drawOn(canvas, x, y) height -= flowHeight else: raise ValueError("Not enough space")