Changeset 656

Show
Ignore:
Timestamp:
08/13/03 11:01:46 (5 years ago)
Author:
sholloway
Message:

*** empty log message ***

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/Renderers/Rapier.py

    r643 r656  
    266266 
    267267    def _DoStyle(self, ri): 
    268         try: style = ri.style 
    269         except AttributeError: pass 
    270  
     268        style = ri.GetStyle() 
    271269        if style: 
    272270            if 'color' in style: 
     
    294292 
    295293    def _DoTransform(self, ri): 
    296         x, y, transform = ri.x, ri.y, ri.transform 
     294        x, y, transform = ri.GetX(), ri.GetY(), ri.GetTransform() 
    297295        if not (x or y or transform): 
    298296            return False 
     
    313311 
    314312    def _DoExtendedTransform(self, ri): 
    315         x, y, w, h = ri.viewBox 
     313        x, y, w, h = ri.GetViewBox() 
    316314        xform = Transformations.OrthographicMgd(None, True, x, x+w, y, y+h) 
    317315 
  • trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/RenderItems/Common.py

    r634 r656  
    6666 
    6767    def InterpretSettings(self, settings): 
    68         try: self.id = settings['id'] 
    69         except LookupError: pass 
     68        self.id = settings.get('id', None) 
    7069 
    7170    def AddChildRenderItems(self, childrenderitems): 
     
    9190    def InterpretSettings(self, settings): 
    9291        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']) 
    10498 
    10599    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
  • trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/RenderItems/Groups.py

    r634 r656  
    4949        GroupRenderItem.InterpretSettings(self, settings) 
    5050 
    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']) 
    5457 
    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']) 
    6660 
    6761    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     
    8983            raise ValueError, '"height" attribute can not be negative"' 
    9084        self._height = height 
    91     height = property(GetHeight, SetHeight) 
     85    #height = property(GetHeight, SetHeight) 
    9286 
    9387    def GetViewBox(self): 
     
    9993    def SetViewBox(self, value): 
    10094        self._viewBox = self._asViewBox(value) 
    101     viewBox = property(GetViewBox, SetViewBox) 
     95    #viewBox = property(GetViewBox, SetViewBox) 
    10296 
    10397    def GetPreserveAspectRatio(self): 
     
    109103    def SetPreserveAspectRatio(self, value): 
    110104        self._alignment = self._asAlignmentList(value) 
    111     preserveAspectRatio = alignment = property(GetPreserveAspectRatio, SetPreserveAspectRatio) 
     105    #preserveAspectRatio = alignment = property(GetPreserveAspectRatio, SetPreserveAspectRatio) 
    112106 
    113107    def GetXAlignment(self): 
     
    118112    def SetXAlignment(self, value): 
    119113        self.alignment[0] = value 
    120     xAlignment = property(GetXAlignment, SetXAlignment) 
     114    #xAlignment = property(GetXAlignment, SetXAlignment) 
    121115 
    122116    def GetYAlignment(self): 
     
    128122        self.alignment[0] = value 
    129123 
    130     yAlignment = property(GetYAlignment, SetYAlignment) 
     124    #yAlignment = property(GetYAlignment, SetYAlignment) 
    131125 
    132126    def GetAlignmentStyle(self): 
     
    138132        self.alignment[2] = value 
    139133 
    140     styleAlignment = property(GetAlignmentStyle, SetAlignmentStyle) 
     134    #styleAlignment = property(GetAlignmentStyle, SetAlignmentStyle) 
    141135 
    142136    #~ helper methods ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
  • trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/RenderItems/Shapes.py

    r622 r656  
    3838    def InterpretSettings(self, settings): 
    3939        ShapeRenderItem.InterpretSettings(self, settings) 
    40         self.points = settings['points'] 
     40        self.SetPoints(settings['points']) 
    4141 
    4242    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
  • trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/SVGSkinObject.py

    r631 r656  
    7979 
    8080        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 
    8587 
    8688        if self.object is not None: 
  • trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/circle.py

    r629 r656  
    6262            raise ValueError, '"radius" attribute can not be negative"' 
    6363        self._radius = radius 
    64     r = radius = rx = ry = property(GetRadius, SetRadius) 
     64    #r = radius = rx = ry = property(GetRadius, SetRadius) 
    6565 
    6666#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
  • trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/defs.py

    r629 r656  
    3131 
    3232class defs(SVGSkinObject): 
     33    def _xmlInitStarted(self): 
     34        SVGSkinObject._xmlInitStarted(self) 
     35        self.PushContext() 
     36        self.context.saveids = True 
     37 
    3338    def DisplayOn(self, renderer): 
    3439        pass # defs are not displayed 
  • trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/desc.py

    r629 r656  
    4141 
    4242    def AddContent(self, content): 
    43         self.content += content 
     43        self.SetContent(self.GetContent() + content) 
    4444 
    4545    def GetContent(self): 
  • trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/ellipse.py

    r629 r656  
    6161        self.SetRX(value) 
    6262        self.SetRY(value) 
    63     r = radius = property(GetRadius, SetRadius) 
     63    #r = radius = property(GetRadius, SetRadius) 
    6464 
    6565    def GetRX(self, useRYifempty=True): 
  • trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/image.py

    r629 r656  
    3838        TransformableRenderItem.InterpretSettings(self, settings) 
    3939 
    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%')
    4242 
    4343        xlink = settings[('http://www.w3.org/1999/xlink', 'href')] 
  • trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/line.py

    r629 r656  
    3737    def InterpretSettings(self, settings): 
    3838        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']) 
    4343 
    4444    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
  • trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/metadata.py

    r629 r656  
    3131 
    3232class metadata(XMLNode.NodeXML): 
    33     def DisplayOn(self, renderer): 
    34         pass 
    35  
    3633    def GetObject(self): 
    3734        return self 
  • trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/path.py

    r629 r656  
    4141    def InterpretSettings(self, settings): 
    4242        ShapeRenderItem.InterpretSettings(self, settings) 
    43         self.d = settings['d'] 
     43        self.SetPath(settings['d']) 
    4444 
    4545    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
  • trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/rect.py

    r629 r656  
    3737    def InterpretSettings(self, settings): 
    3838        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.) 
    4343 
    4444    #~ rect attributes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
  • trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/svg.py

    r630 r656  
    5555        SVGSkinObject._xmlInitStarted(self) 
    5656        self.PushContext() 
     57        self.context.saveids = False 
    5758        self.context.idmapping = self.object.idmapping 
    5859 
  • trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/text.py

    r629 r656  
    4141 
    4242    def AddContent(self, content): 
    43         self.content += content 
     43        self.SetContent(self.GetContent() + content) 
    4444 
    4545    def GetContent(self): 
  • trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkin/title.py

    r629 r656  
    4141 
    4242    def AddContent(self, content): 
    43         self.content += content 
     43        self.SetContent(self.GetContent() + content) 
    4444 
    4545    def GetContent(self): 
  • trunk/RBRapier/RBRapier/Formats/Attic/SVG.old/SVGSkinner.py

    r621 r656  
    3838        ]), 
    3939 
    40     ('http://www.w3.org/1999/xlink',): None, # hum... need support for thsi 
     40    ('http://www.w3.org/1999/xlink',): None, # hum... need support for this 
    4141 
    4242    None: EF.StaticImport('RBRapier.Formats.SVG.SVGSkin.metadata', 'metadata'), # everything that is unknown must be metadata ;)