Changeset 621
- Timestamp:
- 07/14/03 14:04:15 (5 years ago)
- Files:
-
- trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/Renderers/Logging.py (modified) (1 diff)
- trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/Renderers/Null.py (added)
- trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/Renderers/__init__.py (added)
- trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/SVGRendering.py (modified) (6 diffs)
- trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/metadata.py (added)
- trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/svg.py (modified) (1 diff)
- trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkinner.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/Renderers/Logging.py
r615 r621 25 25 26 26 import logging 27 from Rendererimport AbstractRenderer27 from Abstract import AbstractRenderer 28 28 29 29 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/SVGRendering.py
r615 r621 63 63 64 64 def _asCoord(self, coord): 65 warnings.warn("TODO: interpret coords") 66 return float(coord) 65 try: 66 return float(coord) 67 except ValueError: 68 warnings.warn("TODO: interpret coords") 67 69 68 70 def _asCoordTuple(self, coords): … … 108 110 #~ helpers ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 109 111 110 def _asUnimplemented(self, value):111 warnings.warn("TODO: implement")112 return value113 114 112 def _asString(self, value): 115 113 return str(value) … … 128 126 return color 129 127 elif color == 'currentColor': 130 warnings.warn('implement \'currentColor\' color attribute value') 131 return None # TODO 128 return 'currentColor' 132 129 elif not color: 133 130 return None … … 170 167 styledict[name.strip()] = mappingFn(self, value.strip()) 171 168 172 warnings.warn("TODO: interpret styles")173 169 return styledict 174 170 … … 178 174 179 175 explicit_styles_mapping = { 176 "color": _asColor, 177 180 178 "stroke": _asColor, 181 179 "stroke-width": SVGTransformableRenderItem._asCoord, … … 213 211 214 212 def AddChildRenderItems(self, childrenderitems): 213 childrenderitems = [x.object for x in childrenderitems if hasattr(x.object, 'DisplayOn')] 215 214 self.children.extend(childrenderitems) 216 215 trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/svg.py
r615 r621 71 71 72 72 self.PushContext() 73 self.context.idmapping = {}73 self.context.idmapping = self.object.idmapping = {} 74 74 trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkinner.py
r613 r621 39 39 40 40 ('http://www.w3.org/1999/xlink',): None, # hum... need support for thsi 41 42 None: EF.StaticImport('RBRapier.Formats.SVG.SVGSkin.metadata', 'metadata'), # everything that is unknown must be metadata ;) 41 43 } 42 44 43 45 SVGNamespaceSynonyms = { 44 'svg': 'http://www.w3.org/2000/svg', 45 None: 'http://www.w3.org/2000/svg', 46 'xlink':'http://www.w3.org/1999/xlink', # hum... need support for thsi 46 'svg':'http://www.w3.org/2000/svg', 47 None:'http://www.w3.org/2000/svg', 47 48 } 48 49
