Index: src/_backend_agg.cpp
===================================================================
--- src/_backend_agg.cpp	(revision 2309)
+++ src/_backend_agg.cpp	(working copy)
@@ -267,47 +267,6 @@
 
 }
 
-template <class VS>
-void
-RendererAgg::_fill_and_stroke(VS& path,
-			      const GCAgg& gc,
-			      const facepair_t& face,
-			      bool curvy) {
-  typedef agg::conv_curve<VS> curve_t;
-
-  if (face.first) {
-    rendererAA->color(face.second);
-    if (curvy) {
-      curve_t curve(path);
-      theRasterizer->add_path(curve);
-    }
-    else
-      theRasterizer->add_path(path);
-    agg::render_scanlines(*theRasterizer, *slineP8, *rendererAA);
-  }
-
-  //now stroke the edge
-  if (curvy) {
-    curve_t curve(path);
-    agg::conv_stroke<curve_t> stroke(curve);
-    stroke.width(gc.linewidth);
-    stroke.line_cap(gc.cap);
-    stroke.line_join(gc.join);
-    rendererAA->color(gc.color);
-    theRasterizer->add_path(stroke);
-  }
-  else {
-    agg::conv_stroke<VS> stroke(path);
-    stroke.width(gc.linewidth);
-    stroke.line_cap(gc.cap);
-    stroke.line_join(gc.join);
-    rendererAA->color(gc.color);
-    theRasterizer->add_path(stroke);
-  }
-  agg::render_scanlines(*theRasterizer, *slineP8, *rendererAA);
-
-}
-
 Py::Object
 RendererAgg::draw_rectangle(const Py::Tuple & args) {
   _VERBOSE("RendererAgg::draw_rectangle");
@@ -1407,50 +1366,6 @@
 
 }
 
-template<class PathSource>
-void
-RendererAgg::_render_lines_path(PathSource &path, const GCAgg& gc) {
-  _VERBOSE("RendererAgg::_render_lines_path");
-  typedef PathSource path_t;
-  //typedef agg::conv_transform<agg::path_storage, agg::trans_affine> path_t;
-  typedef agg::conv_stroke<path_t> stroke_t;
-  typedef agg::conv_dash<path_t> dash_t;
-
-  //path_t transpath(path, xytrans);
-
-  if (gc.dasha==NULL ) { //no dashes
-    stroke_t stroke(path);
-    stroke.width(gc.linewidth);
-    stroke.line_cap(gc.cap);
-    stroke.line_join(gc.join);
-    rendererAA->color(gc.color);
-    theRasterizer->add_path(stroke);
-  }
-  else {
-
-    dash_t dash(path);
-
-    //todo: dash.dash_start(gc.dashOffset);
-    for (size_t i=0; i<gc.Ndash/2; i+=1)
-      dash.add_dash(gc.dasha[2*i], gc.dasha[2*i+1]);
-
-    agg::conv_stroke<dash_t> stroke(dash);
-    stroke.line_cap(gc.cap);
-    stroke.line_join(gc.join);
-    stroke.width(gc.linewidth);
-    theRasterizer->add_path(stroke); //boyle freeze is herre
-  }
-
-  if ( gc.isaa ) {
-    rendererAA->color(gc.color);
-    agg::render_scanlines(*theRasterizer, *slineP8, *rendererAA);
-  }
-  else {
-    rendererBin->color(gc.color);
-    agg::render_scanlines(*theRasterizer, *slineBin, *rendererBin);
-  }
-}
-
 /*
 Py::Object
 RendererAgg::draw_markers(const Py::Tuple& args) {
Index: src/_backend_agg.h
===================================================================
--- src/_backend_agg.h	(revision 2309)
+++ src/_backend_agg.h	(working copy)
@@ -41,7 +41,21 @@
 typedef agg::rasterizer_scanline_aa<> rasterizer;
 typedef agg::scanline_p8 scanline_p8;
 typedef agg::scanline_bin scanline_bin;
+typedef std::pair<bool, agg::rgba> facepair_t;
 
+// Forward declarations used in the template method tango below to work around
+// the imitations of Microsoft Visual Studio C++ 6.0
+class GCAgg;
+
+template <class VertexSource>
+void RendererAgg_fill_and_stroke(rasterizer *, renderer_aa *, scanline_p8 *,
+  VertexSource&, const GCAgg&, const facepair_t&, bool);
+
+template <class PathSource>
+void RendererAgg_render_lines_path(rasterizer *, renderer_aa *, scanline_p8 *,
+  renderer_bin*, scanline_bin *, PathSource &, const GCAgg&);
+
+
 // a helper class to pass agg::buffer objects around.  agg::buffer is
 // a class in the swig wrapper
 class BufferRegion : public Py::PythonExtension<BufferRegion> {
@@ -97,8 +111,8 @@
 
 // th renderer
 class RendererAgg: public Py::PythonExtension<RendererAgg> {
-  typedef std::pair<bool, agg::rgba> facepair_t;
 public:
+
   RendererAgg(unsigned int width, unsigned int height, double dpi, int debug);
   static void init_type(void);
 
@@ -170,13 +184,112 @@
   agg::rgba rgb_to_color(const Py::SeqBase<Py::Object>& rgb, double alpha);
   facepair_t _get_rgba_face(const Py::Object& rgbFace, double alpha);
   void set_clipbox_rasterizer( double *cliprect);
-  template <class VS> void _fill_and_stroke(VS&, const GCAgg&, const facepair_t&, bool curvy=true);  
 
-  template<class PathSource>
-  void _render_lines_path(PathSource &ps, const GCAgg& gc);
+  void _fill_and_stroke(agg::path_storage &path, const GCAgg &gc,
+    const facepair_t &face, bool curvy=true)
+  {
+    RendererAgg_fill_and_stroke(theRasterizer, rendererAA, slineP8, path, gc,
+      face, curvy);
+  }
+
+  void _fill_and_stroke(agg::ellipse &path, const GCAgg &gc,
+    const facepair_t &face, bool curvy=true)
+  {
+    RendererAgg_fill_and_stroke(theRasterizer, rendererAA, slineP8, path, gc,
+      face, curvy);
+  }
+
+  void _render_lines_path(agg::path_storage &path, const GCAgg &gc)
+  {
+    RendererAgg_render_lines_path(theRasterizer, rendererAA, slineP8,
+      rendererBin, slineBin, path, gc);
+  }
 };
 
 
+template <class VertexSource>
+void RendererAgg_fill_and_stroke(rasterizer *theRasterizer,
+  renderer_aa *rendererAA, scanline_p8 *slineP8, VertexSource &path,
+  const GCAgg &gc, const facepair_t &face, bool curvy)
+{
+  typedef agg::conv_curve<VertexSource> curve_t;
+
+  if (face.first) {
+    rendererAA->color(face.second);
+    if (curvy) {
+      curve_t curve(path);
+      theRasterizer->add_path(curve);
+    } else {
+      theRasterizer->add_path(path);
+    }
+    agg::render_scanlines(*theRasterizer, *slineP8, *rendererAA);
+  }
+
+  //now stroke the edge
+  if (curvy) {
+    curve_t curve(path);
+    agg::conv_stroke<curve_t> stroke(curve);
+    stroke.width(gc.linewidth);
+    stroke.line_cap(gc.cap);
+    stroke.line_join(gc.join);
+    rendererAA->color(gc.color);
+    theRasterizer->add_path(stroke);
+  } else {
+    agg::conv_stroke<VertexSource> stroke(path);
+    stroke.width(gc.linewidth);
+    stroke.line_cap(gc.cap);
+    stroke.line_join(gc.join);
+    rendererAA->color(gc.color);
+    theRasterizer->add_path(stroke);
+  }
+
+  agg::render_scanlines(*theRasterizer, *slineP8, *rendererAA);
+}
+
+
+template <class PathSource>
+void RendererAgg_render_lines_path(rasterizer *theRasterizer,
+  renderer_aa *rendererAA, scanline_p8 *slineP8, renderer_bin *rendererBin,
+  scanline_bin *slineBin, PathSource &path, const GCAgg &gc)
+{
+  typedef PathSource path_t;
+  //typedef agg::conv_transform<agg::path_storage, agg::trans_affine> path_t;
+  typedef agg::conv_stroke<path_t> stroke_t;
+  typedef agg::conv_dash<path_t> dash_t;
+
+  //path_t transpath(path, xytrans);
+
+  if (gc.dasha==NULL ) { //no dashes
+    stroke_t stroke(path);
+    stroke.width(gc.linewidth);
+    stroke.line_cap(gc.cap);
+    stroke.line_join(gc.join);
+    rendererAA->color(gc.color);
+    theRasterizer->add_path(stroke);
+  } else {
+    dash_t dash(path);
+
+    //todo: dash.dash_start(gc.dashOffset);
+    for (size_t i=0; i<gc.Ndash/2; i+=1)
+      dash.add_dash(gc.dasha[2*i], gc.dasha[2*i+1]);
+
+    agg::conv_stroke<dash_t> stroke(dash);
+    stroke.line_cap(gc.cap);
+    stroke.line_join(gc.join);
+    stroke.width(gc.linewidth);
+    theRasterizer->add_path(stroke); //boyle freeze is herre
+  }
+
+  if ( gc.isaa ) {
+    rendererAA->color(gc.color);
+    agg::render_scanlines(*theRasterizer, *slineP8, *rendererAA);
+  } else {
+    rendererBin->color(gc.color);
+    agg::render_scanlines(*theRasterizer, *slineBin, *rendererBin);
+  }
+}
+
+
 // the extension module
 class _backend_agg_module : public Py::ExtensionModule<_backend_agg_module>
 {
