lib/shapes/ShapeGroup.py
def fitToWidth(self, width=0.0):
		"""Fits shape to given width maintaining scale.

		@param width: The width to fit to
		"""

		scalingfactor = 1.0 - ((self.width - float(width)) / self.width)
		for shape in self.shapes:
			distx = shape.position.x - self.position.x
			disty = shape.position.y - self.position.y
			shape.fitToWidth(shape.width * scalingfactor)
			shape.translate(-distx * (1.0 - scalingfactor), -disty * (1.0 - scalingfactor))
Fits shape to given width maintaining scale.

		@param width: The width to fit to
		
Fits shape to given width maintaining scale.
Fits shape to given width maintaining scale .
def fitToWidth(self, width=0.0):
		scalingfactor = 1.0 - ((self.width - float(width)) / self.width)
		for shape in self.shapes:
			distx = shape.position.x - self.position.x
			disty = shape.position.y - self.position.y
			shape.fitToWidth(shape.width * scalingfactor)
			shape.translate(-distx * (1.0 - scalingfactor), -disty * (1.0 - scalingfactor))
def fitToWidth ( self , width = 0.0 ) : scalingfactor = 1.0 - ( ( self . width - float ( width ) ) / self . width ) for shape in self . shapes : distx = shape . position . x - self . position . x disty = shape . position . y - self . position . y shape . fitToWidth ( shape . width * scalingfactor ) shape . translate ( - distx * ( 1.0 - scalingfactor ) , - disty * ( 1.0 - scalingfactor ) )
Fits shape to given width maintaining scale.
Fits shape to given width maintaining scale .
"""Fits shape to given width maintaining scale.

		@param width: The width to fit to
		"""
self
width
The width to fit to
The width to fit to