lib/shapes/Text.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")

		scalingFactor = 1.0 - ((self.width - float(width)) / self.width)
		self.fontsize *= 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):
		if width <= 0:
			raise ValueError("width must be greater than 0")
		scalingFactor = 1.0 - ((self.width - float(width)) / self.width)
		self.fontsize *= scalingFactor
def fitToWidth ( self , width = 0.0 ) : if width <= 0 : raise ValueError ( "width must be greater than 0" ) scalingFactor = 1.0 - ( ( self . width - float ( width ) ) / self . width ) self . fontsize *= 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