Show
Ignore:
Timestamp:
08/23/03 01:52:52 (5 years ago)
Author:
sholloway
Message:

*** empty log message ***

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/RBRapier/RBRapier/Formats/SVG/SVGSkin/SVGItems/Common.py

    r658 r671  
    3131#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    3232 
    33 _re_coordwithunits = re.compile(r'([-+]?(?:\d+(?:\.\d*)?|\d*\.\d+)(?:[eE][-+]?\d+)?)(\w*)') 
     33_re_coordwithunits = re.compile(r'([-+]?(?:\d+(?:\.\d*)?|\d*\.\d+)(?:[eE][-+]?\d+)?)(\D*)') 
    3434 
    3535#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     
    7979            if match: 
    8080                value, units = match.groups() 
    81                 return float(value) 
     81                # FIXME 
     82                print "Warning: unit %r found in coordinate %r" % (units, coord) 
     83                if units == '%': 
     84                    return None  
     85                else: 
     86                    return float(value) 
    8287            else: 
    8388                raise 
  • trunk/RBRapier/RBRapier/Formats/SVG/SVGSkin/SVGItems/Groups.py

    r657 r671  
    4242        if width is not None: 
    4343            width = self._asCoord(width) 
    44             if width < 0
     44            if width < 0 and width is not None
    4545                raise ValueError, '"width" attribute can not be negative"' 
    4646        height = settings.get('height', None) 
    4747        if height is not None: 
    4848            height = self._asCoord(height) 
    49             if height < 0
     49            if height < 0 and height is not None
    5050                raise ValueError, '"height" attribute can not be negative"' 
    5151        self.object.SetDimensions(width, height)