changeset 20623:2be59ab36110

Add method in gl_render to get a list of parsed ft_string (bug #31468) * gl-render.h (opengl_renderer::text_to_strlist): declare new method * gl-render.c (opengl_renderer::text_to_strlist): call ft_render::text_to_strlist
author Pantxo Diribarne <pantxo.diribarne@gmail.com>
date Tue, 13 Oct 2015 00:01:13 +0200
parents caa5dabc7913
children 4e47e10d5279
files libinterp/corefcn/gl-render.cc libinterp/corefcn/gl-render.h
diffstat 2 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/gl-render.cc	Mon Oct 12 22:14:25 2015 +0200
+++ b/libinterp/corefcn/gl-render.cc	Tue Oct 13 00:01:13 2015 +0200
@@ -3234,6 +3234,18 @@
 #endif
 }
 
+void
+opengl_renderer::text_to_strlist (const std::string& txt,
+                                  std::list<ft_render::ft_string>& lst,
+                                  Matrix& bbox,
+                                  int halign, int valign, double rotation)
+{
+#if HAVE_FREETYPE
+  text_renderer.text_to_strlist (txt, lst, bbox,
+                                 halign, valign, rotation, interpreter);
+#endif
+}
+
 Matrix
 opengl_renderer::render_text (const std::string& txt,
                               double x, double y, double z,
--- a/libinterp/corefcn/gl-render.h	Mon Oct 12 22:14:25 2015 +0200
+++ b/libinterp/corefcn/gl-render.h	Tue Oct 13 00:01:13 2015 +0200
@@ -124,6 +124,12 @@
                                int halign = 0, int valign = 0,
                                double rotation = 0.0);
 
+  virtual void text_to_strlist (const std::string& txt,
+                                std::list<ft_render::ft_string>& lst,
+                                Matrix& bbox,
+                                int halign = 0, int valign = 0, 
+                                double rotation = 0.0);
+
   virtual Matrix render_text (const std::string& txt,
                               double x, double y, double z,
                               int halign, int valign, double rotation = 0.0);