/[thuban]/trunk/thuban/Extensions/svgexport/svgmapwriter.py
ViewVC logotype

Diff of /trunk/thuban/Extensions/svgexport/svgmapwriter.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2431 by bernhard, Mon Nov 22 11:17:47 2004 UTC revision 2432 by bernhard, Tue Dec 7 11:19:38 2004 UTC
# Line 699  class VirtualDC(XMLWriter): Line 699  class VirtualDC(XMLWriter):
699          # Put everything together and write it to the file          # Put everything together and write it to the file
700          self.file.write('%s %s d="%s"/>\n' % (self.make_id(),          self.file.write('%s %s d="%s"/>\n' % (self.make_id(),
701              self.make_meta(), join(data, '') ) )              self.make_meta(), join(data, '') ) )
702        
703      def DrawSpline(self, points, closed=0):      def DrawSpline(self, points, closed=0):
704          """Draw a spline object.          """Draw a spline object.
705          """          """
706          self.DrawPolygon(points, 0)          self.write_indent('<path %s ' % (self.make_style(1,1,0)))
707          print "TODO: DrawSpline(..)"          datastr = ""
708          return # TODO: Implement          # we have four points: start, control, control, end
709            datastr+=('M %s %s C' % (points[0].x, points[0].y))
710            for i in (1,2,3):
711                datastr+=(' %s %s' %  (points[i].x,points[i].y))
712            self.file.write('%s %s d="%s"/>\n' % (self.make_id(),
713                self.make_meta(), datastr ) )
714    
715      def BeginClipPath(self, id):      def BeginClipPath(self, id):
716          """Build a clipping region to draw in."""          """Build a clipping region to draw in."""
717          self.write_indent('<clipPath id="%s">\n' % id)          self.write_indent('<clipPath id="%s">\n' % id)
718          self.indent_level += 1          self.indent_level += 1
719        
720      def EndClipPath(self):      def EndClipPath(self):
721          """End a clip path."""          """End a clip path."""
722          self.indent_level -= 1          self.indent_level -= 1

Legend:
Removed from v.2431  
changed lines
  Added in v.2432

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26