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

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

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

		# Maintain scale. Divide by 2 since it's a radius
		scalingFactor = 1.0 - ((self.rx - float(width)) / self.rx)
		self.rx = width / 2.0
		self.ry = (self.ry * scalingFactor) / 2.0
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):
		if width <= 0:
			raise ValueError("width must be greater than 0")
		scalingFactor = 1.0 - ((self.rx - float(width)) / self.rx)
		self.rx = width / 2.0
		self.ry = (self.ry * scalingFactor) / 2.0
def fitToWidth ( self , width = 0.0 ) : if width <= 0 : raise ValueError ( "width must be greater than 0" ) scalingFactor = 1.0 - ( ( self . rx - float ( width ) ) / self . rx ) self . rx = width / 2.0 self . ry = ( self . ry * scalingFactor ) / 2.0
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
		""" # Maintain scale. Divide by 2 since it's a radius
self
width
The width to fit to
The width to fit to