diff libinterp/corefcn/gl-render.h @ 21209:67d2965af0b5

revamp text rendering classes * base-text-renderer.h: New file. * ft-text-renderer.h, ft-text-renderer.cc: New files for freetype text rendering classes, adapted from txt-eng-ft.h and txt-eng.cc. * text-renderer.h, text-renderer.cc: New files. Public interface for text rendering. * gl-select.cc, gl-render.cc, gl-render.h, gl2ps-print.cc, graphics.cc, graphics.in.h: Adapt to use new text rendering interface that does not require checking HAVE_FREETYPE. * libinterp/corefcn/module.mk: Update.
author John W. Eaton <jwe@octave.org>
date Sat, 06 Feb 2016 08:15:53 -0500
parents 1adcdc518d9e
children 1473547f50f5
line wrap: on
line diff
--- a/libinterp/corefcn/gl-render.h	Fri Feb 05 14:53:10 2016 -0500
+++ b/libinterp/corefcn/gl-render.h	Sat Feb 06 08:15:53 2016 -0500
@@ -25,7 +25,7 @@
 
 #include "graphics.h"
 #include "oct-opengl.h"
-#include "txt-eng-ft.h"
+#include "text-renderer.h"
 
 #if defined (HAVE_OPENGL)
 
@@ -37,10 +37,7 @@
   opengl_renderer (void)
     : toolkit (), xform (), xmin (), xmax (), ymin (), ymax (),
     zmin (), zmax (), xZ1 (), xZ2 (), marker_id (), filled_marker_id (),
-    camera_pos (), camera_dir (), interpreter ("none")
-#if HAVE_FREETYPE
-    , text_renderer ()
-#endif
+    camera_pos (), camera_dir (), interpreter ("none"), txt_renderer ()
   { }
 
   virtual ~opengl_renderer (void) { }
@@ -105,7 +102,7 @@
                                double rotation = 0.0);
 
   virtual void text_to_strlist (const std::string& txt,
-                                std::list<ft_render::ft_string>& lst,
+                                std::list<text_renderer::string>& lst,
                                 Matrix& bbox,
                                 int halign = 0, int valign = 0,
                                 double rotation = 0.0);
@@ -195,10 +192,7 @@
   // interpreter to be used by text_to_pixels
   caseless_str interpreter;
 
-#if HAVE_FREETYPE
-  // FreeType render, used for text rendering
-  ft_render text_renderer;
-#endif
+  text_renderer txt_renderer;
 
 private:
   class patch_tesselator;