Changeset 671 for trunk/RBRapier/RBRapier/Formats/SVG/SVGSkin/SVGItems
- Timestamp:
- 08/23/03 01:52:52 (5 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/RBRapier/RBRapier/Formats/SVG/SVGSkin/SVGItems/Common.py
r658 r671 31 31 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 32 32 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*)') 34 34 35 35 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 79 79 if match: 80 80 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) 82 87 else: 83 88 raise trunk/RBRapier/RBRapier/Formats/SVG/SVGSkin/SVGItems/Groups.py
r657 r671 42 42 if width is not None: 43 43 width = self._asCoord(width) 44 if width < 0 :44 if width < 0 and width is not None: 45 45 raise ValueError, '"width" attribute can not be negative"' 46 46 height = settings.get('height', None) 47 47 if height is not None: 48 48 height = self._asCoord(height) 49 if height < 0 :49 if height < 0 and height is not None: 50 50 raise ValueError, '"height" attribute can not be negative"' 51 51 self.object.SetDimensions(width, height)
