Changeset 656
- Timestamp:
- 08/13/03 11:01:46 (5 years ago)
- Files:
-
- trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/Renderers/Rapier.py (modified) (3 diffs)
- trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/RenderItems/Common.py (modified) (2 diffs)
- trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/RenderItems/Groups.py (modified) (7 diffs)
- trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/RenderItems/Shapes.py (modified) (1 diff)
- trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/SVGSkinObject.py (modified) (1 diff)
- trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/circle.py (modified) (1 diff)
- trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/defs.py (modified) (1 diff)
- trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/desc.py (modified) (1 diff)
- trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/ellipse.py (modified) (1 diff)
- trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/image.py (modified) (1 diff)
- trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/line.py (modified) (1 diff)
- trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/metadata.py (modified) (1 diff)
- trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/path.py (modified) (1 diff)
- trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/rect.py (modified) (1 diff)
- trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/svg.py (modified) (1 diff)
- trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/text.py (modified) (1 diff)
- trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/title.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/Rapier.py
r643 r656 266 266 267 267 def _DoStyle(self, ri): 268 try: style = ri.style 269 except AttributeError: pass 270 268 style = ri.GetStyle() 271 269 if style: 272 270 if 'color' in style: … … 294 292 295 293 def _DoTransform(self, ri): 296 x, y, transform = ri. x, ri.y, ri.transform294 x, y, transform = ri.GetX(), ri.GetY(), ri.GetTransform() 297 295 if not (x or y or transform): 298 296 return False … … 313 311 314 312 def _DoExtendedTransform(self, ri): 315 x, y, w, h = ri. viewBox313 x, y, w, h = ri.GetViewBox() 316 314 xform = Transformations.OrthographicMgd(None, True, x, x+w, y, y+h) 317 315 trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/RenderItems/Common.py
r634 r656 66 66 67 67 def InterpretSettings(self, settings): 68 try: self.id = settings['id'] 69 except LookupError: pass 68 self.id = settings.get('id', None) 70 69 71 70 def AddChildRenderItems(self, childrenderitems): … … 91 90 def InterpretSettings(self, settings): 92 91 RenderItemBase.InterpretSettings(self, settings) 93 try: x = settings['x'] 94 except LookupError: pass 95 else: self.x = x 96 97 try: y = settings['y'] 98 except LookupError: pass 99 else: self.y = y 100 101 try: transform = settings['transform '] 102 except LookupError: pass 103 else: self.transform = transform 92 if 'x' in settings: 93 self.SetX(settings['x']) 94 if 'y' in settings: 95 self.SetY(settings['y']) 96 if 'transform' in settings: 97 self.SetTransform(settings['transform']) 104 98 105 99 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/RenderItems/Groups.py
r634 r656 49 49 GroupRenderItem.InterpretSettings(self, settings) 50 50 51 try: width = settings['width'] 52 except LookupError: pass 53 else: self.width = width 51 if 'width' in settings: 52 self.SetWidth(settings['width']) 53 if 'height' in settings: 54 self.SetHeight(settings['height']) 55 if 'viewBox' in settings: 56 self.SetViewBox(settings['viewBox']) 54 57 55 try: height = settings['height'] 56 except LookupError: pass 57 else: self.height = height 58 59 try: viewBox = settings['viewBox'] 60 except LookupError: pass 61 else: self.viewBox = viewBox 62 63 try: preserveAspectRatio = settings['preserveAspectRatio'] 64 except LookupError: pass 65 else: self.preserveAspectRatio = preserveAspectRatio 58 if 'preserveAspectRatio' in settings: 59 self.SetPreserveAspectRatio(settings['preserveAspectRatio']) 66 60 67 61 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 89 83 raise ValueError, '"height" attribute can not be negative"' 90 84 self._height = height 91 height = property(GetHeight, SetHeight)85 #height = property(GetHeight, SetHeight) 92 86 93 87 def GetViewBox(self): … … 99 93 def SetViewBox(self, value): 100 94 self._viewBox = self._asViewBox(value) 101 viewBox = property(GetViewBox, SetViewBox)95 #viewBox = property(GetViewBox, SetViewBox) 102 96 103 97 def GetPreserveAspectRatio(self): … … 109 103 def SetPreserveAspectRatio(self, value): 110 104 self._alignment = self._asAlignmentList(value) 111 preserveAspectRatio = alignment = property(GetPreserveAspectRatio, SetPreserveAspectRatio)105 #preserveAspectRatio = alignment = property(GetPreserveAspectRatio, SetPreserveAspectRatio) 112 106 113 107 def GetXAlignment(self): … … 118 112 def SetXAlignment(self, value): 119 113 self.alignment[0] = value 120 xAlignment = property(GetXAlignment, SetXAlignment)114 #xAlignment = property(GetXAlignment, SetXAlignment) 121 115 122 116 def GetYAlignment(self): … … 128 122 self.alignment[0] = value 129 123 130 yAlignment = property(GetYAlignment, SetYAlignment)124 #yAlignment = property(GetYAlignment, SetYAlignment) 131 125 132 126 def GetAlignmentStyle(self): … … 138 132 self.alignment[2] = value 139 133 140 styleAlignment = property(GetAlignmentStyle, SetAlignmentStyle)134 #styleAlignment = property(GetAlignmentStyle, SetAlignmentStyle) 141 135 142 136 #~ helper methods ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/RenderItems/Shapes.py
r622 r656 38 38 def InterpretSettings(self, settings): 39 39 ShapeRenderItem.InterpretSettings(self, settings) 40 self. points = settings['points']40 self.SetPoints(settings['points']) 41 41 42 42 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/SVGSkinObject.py
r631 r656 79 79 80 80 try: 81 idname = self.settings['id'] 82 idmapping = self.context.idmapping 83 except (KeyError, AttributeError): pass 84 else: idmapping[idname] = self.object 81 if self.context.saveids: 82 idname = self.settings['id'] 83 idmapping = self.context.idmapping 84 idmapping[idname] = self.object 85 except (KeyError, AttributeError): 86 pass 85 87 86 88 if self.object is not None: trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/circle.py
r629 r656 62 62 raise ValueError, '"radius" attribute can not be negative"' 63 63 self._radius = radius 64 r = radius = rx = ry = property(GetRadius, SetRadius)64 #r = radius = rx = ry = property(GetRadius, SetRadius) 65 65 66 66 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/defs.py
r629 r656 31 31 32 32 class defs(SVGSkinObject): 33 def _xmlInitStarted(self): 34 SVGSkinObject._xmlInitStarted(self) 35 self.PushContext() 36 self.context.saveids = True 37 33 38 def DisplayOn(self, renderer): 34 39 pass # defs are not displayed trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/desc.py
r629 r656 41 41 42 42 def AddContent(self, content): 43 self. content += content43 self.SetContent(self.GetContent() + content) 44 44 45 45 def GetContent(self): trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/ellipse.py
r629 r656 61 61 self.SetRX(value) 62 62 self.SetRY(value) 63 r = radius = property(GetRadius, SetRadius)63 #r = radius = property(GetRadius, SetRadius) 64 64 65 65 def GetRX(self, useRYifempty=True): trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/image.py
r629 r656 38 38 TransformableRenderItem.InterpretSettings(self, settings) 39 39 40 self. width = settings.get('width', '100%')41 self. height = settings.get('height', '100%')40 self.SetWidth(settings.get('width', '100%')) 41 self.SetHeight(settings.get('height', '100%')) 42 42 43 43 xlink = settings[('http://www.w3.org/1999/xlink', 'href')] trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/line.py
r629 r656 37 37 def InterpretSettings(self, settings): 38 38 ShapeRenderItem.InterpretSettings(self, settings) 39 self. x1 = settings['x1']40 self. y1 = settings['y1']41 self. x2 = settings['x2']42 self. y2 = settings['y2']39 self.SetX1(settings['x1']) 40 self.SetY1(settings['y1']) 41 self.SetX2(settings['x2']) 42 self.SetY2(settings['y2']) 43 43 44 44 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/metadata.py
r629 r656 31 31 32 32 class metadata(XMLNode.NodeXML): 33 def DisplayOn(self, renderer):34 pass35 36 33 def GetObject(self): 37 34 return self trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/path.py
r629 r656 41 41 def InterpretSettings(self, settings): 42 42 ShapeRenderItem.InterpretSettings(self, settings) 43 self. d = settings['d']43 self.SetPath(settings['d']) 44 44 45 45 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/rect.py
r629 r656 37 37 def InterpretSettings(self, settings): 38 38 ShapeRenderItem.InterpretSettings(self, settings) 39 self. width =settings.get('width', 1.0)40 self. height =settings.get('height', 1.0)41 self. rx =settings.get('rx', 0.)42 self. ry =settings.get('ry', 0.)39 self.SetWidth(settings.get('width', 1.0) 40 self.SetHeight(settings.get('height', 1.0) 41 self.SetRX(settings.get('rx', 0.) 42 self.SetRY(settings.get('ry', 0.) 43 43 44 44 #~ rect attributes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/svg.py
r630 r656 55 55 SVGSkinObject._xmlInitStarted(self) 56 56 self.PushContext() 57 self.context.saveids = False 57 58 self.context.idmapping = self.object.idmapping 58 59 trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/text.py
r629 r656 41 41 42 42 def AddContent(self, content): 43 self. content += content43 self.SetContent(self.GetContent() + content) 44 44 45 45 def GetContent(self): trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/title.py
r629 r656 41 41 42 42 def AddContent(self, content): 43 self. content += content43 self.SetContent(self.GetContent() + content) 44 44 45 45 def GetContent(self): trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkinner.py
r621 r656 38 38 ]), 39 39 40 ('http://www.w3.org/1999/xlink',): None, # hum... need support for th si40 ('http://www.w3.org/1999/xlink',): None, # hum... need support for this 41 41 42 42 None: EF.StaticImport('RBRapier.Formats.SVG.SVGSkin.metadata', 'metadata'), # everything that is unknown must be metadata ;)
