Mercurial > octave-nkf
comparison libinterp/corefcn/gl-render.h @ 20320:6db2ea5556a4
Make use of the axes "ticklabelinterpreter" property (bug #45438)
* plot.txi: add an anchor pointing to usage of interpreter property
* genpropdoc.m: document axes "ticklabelinterpreter" property and text "interpreter" property
* gl-render.h: new private attribute "interpreter" that stores the interperter to be used in text_to_pixels
* gl-render.h (set_interpreter): new protected virtual method to set "interpreter"
* gl-render.cc (opengl_renderer::draw_axes): set interpreter before rendering tick labels
* gl-render.cc (opengl_renderer::text_to_pixels): make use of interpreter attribute
* graphics.cc (axes::properties::set_defaults): initialize "ticklabelinterpreter" instead of unused "interpreter"
* graphics.in.h (axes::properties): fix doubly defined defaults for "ticklabelinterpreter" and "interpreter" properties
author | Pantxo Diribarne <pantxo.diribarne@gmail.com> |
---|---|
date | Tue, 23 Jun 2015 22:21:50 +0200 |
parents | a9574e3c6e9e |
children | dcfbf4c1c3c8 |
comparison
equal
deleted
inserted
replaced
20319:085c99b96aed | 20320:6db2ea5556a4 |
---|---|
57 { | 57 { |
58 public: | 58 public: |
59 opengl_renderer (void) | 59 opengl_renderer (void) |
60 : toolkit (), xform (), xmin (), xmax (), ymin (), ymax (), | 60 : toolkit (), xform (), xmin (), xmax (), ymin (), ymax (), |
61 zmin (), zmax (), xZ1 (), xZ2 (), marker_id (), filled_marker_id (), | 61 zmin (), zmax (), xZ1 (), xZ2 (), marker_id (), filled_marker_id (), |
62 camera_pos (), camera_dir () | 62 camera_pos (), camera_dir (), interpreter ("none") |
63 #if HAVE_FREETYPE | 63 #if HAVE_FREETYPE |
64 , text_renderer () | 64 , text_renderer () |
65 #endif | 65 #endif |
66 { } | 66 { } |
67 | 67 |
106 virtual void set_linestyle (const std::string& s, bool stipple = false); | 106 virtual void set_linestyle (const std::string& s, bool stipple = false); |
107 virtual void set_clipbox (double x1, double x2, double y1, double y2, | 107 virtual void set_clipbox (double x1, double x2, double y1, double y2, |
108 double z1, double z2); | 108 double z1, double z2); |
109 virtual void set_clipping (bool on); | 109 virtual void set_clipping (bool on); |
110 virtual void set_font (const base_properties& props); | 110 virtual void set_font (const base_properties& props); |
111 virtual void set_interpreter (const caseless_str interp) | |
112 { | |
113 interpreter = interp; | |
114 } | |
111 | 115 |
112 virtual void init_marker (const std::string& m, double size, float width); | 116 virtual void init_marker (const std::string& m, double size, float width); |
113 virtual void end_marker (void); | 117 virtual void end_marker (void); |
114 virtual void draw_marker (double x, double y, double z, | 118 virtual void draw_marker (double x, double y, double z, |
115 const Matrix& lc, const Matrix& fc); | 119 const Matrix& lc, const Matrix& fc); |
205 unsigned int marker_id, filled_marker_id; | 209 unsigned int marker_id, filled_marker_id; |
206 | 210 |
207 // camera information for primitive sorting | 211 // camera information for primitive sorting |
208 ColumnVector camera_pos, camera_dir; | 212 ColumnVector camera_pos, camera_dir; |
209 | 213 |
214 // interpreter to be used by text_to_pixels | |
215 caseless_str interpreter; | |
216 | |
210 #if HAVE_FREETYPE | 217 #if HAVE_FREETYPE |
211 // FreeType render, used for text rendering | 218 // FreeType render, used for text rendering |
212 ft_render text_renderer; | 219 ft_render text_renderer; |
213 #endif | 220 #endif |
214 | 221 |