Logo Search packages:      
Sourcecode: zope-extfile version File versions

def zope-extfile-1.4.2::ExtImage::ExtImage::_formatDimensions (   self,
) [private]

Make sure, the dimensions are valid int's 

Definition at line 491 of file ExtImage.py.

00491                                            :
        """ Make sure, the dimensions are valid int's """
        if type(maxx) is types.StringType:
            try: maxx = string.atoi(maxx)
            except: maxx = self._image_size['default']
        if type(maxy) is types.StringType:
            try: maxy = string.atoi(maxy)
            except: maxy = self._image_size['default']
        if maxx!=0 and maxy!=0:
            if maxx<self._image_size['min']: maxx = self._image_size['min']
            elif maxx>self._image_size['max']: maxx = self._image_size['max']
            if maxy<self._image_size['min']: maxy = self._image_size['min']
            elif maxy>self._image_size['max']: maxy = self._image_size['max']
        return maxx, maxy
    def _undo(self):

Generated by  Doxygen 1.6.0   Back to index