lib/shapes/Shape.py
def fit(self, width=0.0, height=0.0):
		"""Fits shape to given width and height maintaining scale.

		@param width: the width to fit to
		@param height: the height to fit to
		"""

		if width <= 0 and height <= 0:
			raise ValueError("width or height must be greater than 0")

		if height < width and height > 0 or width <= 0:
			self.fitToHeight(height)
		else:
			self.fitToWidth(width)
Fits shape to given width and height maintaining scale.

		@param width: the width to fit to
		@param height: the height to fit to
		
Fits shape to given width and height maintaining scale.
Fits shape to given width and height maintaining scale .
def fit(self, width=0.0, height=0.0):
		if width <= 0 and height <= 0:
			raise ValueError("width or height must be greater than 0")
		if height < width and height > 0 or width <= 0:
			self.fitToHeight(height)
		else:
			self.fitToWidth(width)
def fit ( self , width = 0.0 , height = 0.0 ) : if width <= 0 and height <= 0 : raise ValueError ( "width or height must be greater than 0" ) if height < width and height > 0 or width <= 0 : self . fitToHeight ( height ) else : self . fitToWidth ( width )
Fits shape to given width and height maintaining scale.
Fits shape to given width and height maintaining scale .
"""Fits shape to given width and height maintaining scale.

		@param width: the width to fit to
		@param height: the height to fit to
		"""
self
width
the width to fit to
the width to fit to
height
the height to fit to
the height to fit to