diff libinterp/dldfcn/__init_fltk__.cc @ 19639:61cc00ebac60

move opengl printing code from __init_fltk__.cc to gl2ps-renderer.cc * gl2ps-renderer.h, gl2ps-renderer.cc (gl2ps_print): New function. * __init_fltk__.cc (OpenGL_fltk::print): Use it.
author John W. Eaton <jwe@octave.org>
date Thu, 29 Jan 2015 17:07:09 -0500
parents dec5b96ca298
children 0cdda69dc2b4
line wrap: on
line diff
--- a/libinterp/dldfcn/__init_fltk__.cc	Tue Jan 27 18:55:25 2015 +0100
+++ b/libinterp/dldfcn/__init_fltk__.cc	Thu Jan 29 17:07:09 2015 -0500
@@ -83,11 +83,9 @@
 
 #include "display.h"
 #include "file-ops.h"
-#include "gl-render.h"
 #include "gl2ps-renderer.h"
 #include "graphics.h"
 #include "parse.h"
-#include "sysdep.h"
 #include "toplev.h"
 #include "variables.h"
 
@@ -133,15 +131,8 @@
   void print (const std::string& cmd, const std::string& term)
   {
     //std::cout << "OpenGL_fltk::print(cmd=" << cmd << ", term=" << term << ") canvas size = " << w () << "x" << h () << std::endl;
-#ifdef HAVE_GL2PS_H
-    FILE *fp;
-    fp = octave_popen (cmd.c_str (), "w");
-    glps_renderer rend (fp, term);
-    rend.draw (gh_manager::get_object (number), cmd);
-    octave_pclose (fp);
-#else
-    error ("fltk: printing not available without gl2ps library");
-#endif
+
+    gl2ps_print (gh_manager::get_object (number), cmd, term);
   }
 
   void resize (int xx, int yy, int ww, int hh)