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

		@param height: The height to fit to
		"""

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

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

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