50 virtual void draw (
const graphics_object& go,
bool toplevel =
true);
55 void draw (
const Matrix& hlist,
bool toplevel =
false);
57 virtual void set_viewport (
int w,
int h);
59 virtual Matrix get_viewport_scaled ()
const;
63 virtual void draw_zoom_box (
int width,
int height,
64 int x1,
int y1,
int x2,
int y2,
65 const Matrix& overlaycolor,
68 double borderalpha,
double borderwidth);
70 virtual void finish ();
74 virtual void draw_figure (
const figure::properties& props);
75 virtual void draw_axes (
const axes::properties& props);
76 virtual void draw_line (
const line::properties& props);
77 virtual void draw_surface (
const surface::properties& props);
78 virtual void draw_patch (
const patch::properties& props);
79 virtual void draw_scatter (
const scatter::properties& props);
80 virtual void draw_light (
const light::properties& props);
81 virtual void draw_hggroup (
const hggroup::properties& props);
82 virtual void draw_text (
const text::properties& props);
83 virtual void draw_text_background (
const text::properties& props,
84 bool do_rotate =
false);
85 virtual void draw_image (
const image::properties& props);
86 virtual void draw_uipanel (
const uipanel::properties& props,
87 const graphics_object& go);
88 virtual void draw_uibuttongroup (
const uibuttongroup::properties& props,
89 const graphics_object& go);
90 virtual void init_gl_context (
bool enhanced,
const Matrix& backgroundColor);
91 virtual void setup_opengl_transformation (
const axes::properties& props);
93 virtual void set_clipbox (
double x1,
double x2,
double y1,
double y2,
94 double z1,
double z2);
95 virtual void set_clipping (
bool on);
96 virtual void set_font (
const base_properties& props);
97 virtual void set_color (
const Matrix& c);
100 m_interpreter = interp;
102 virtual void set_linewidth (
float w);
103 virtual void set_linestyle (
const std::string& s,
bool stipple =
false,
104 double linewidth = 0.5);
107 virtual void set_polygon_offset (
bool on,
float offset = 0.0f);
113 virtual void init_marker (
const std::string& m,
double size,
float width);
114 virtual void change_marker (
const std::string& m,
double size);
115 virtual void end_marker ();
116 virtual void draw_marker (
double x,
double y,
double z,
118 const double la = 1.0,
const double fa = 1.0);
120 virtual void text_to_pixels (
const std::string& txt,
123 int halign = 0,
int valign = 0,
124 double rotation = 0.0);
126 virtual void text_to_strlist (
const std::string& txt,
127 std::list<text_renderer::string>& lst,
129 int halign = 0,
int valign = 0,
130 double rotation = 0.0);
132 virtual Matrix render_text (
const std::string& txt,
133 double x,
double y,
double z,
134 int halign,
int valign,
double rotation = 0.0);
136 virtual void render_grid (
const double linewidth,
137 const std::string& gridstyle,
138 const Matrix& gridcolor,
const double gridalpha,
139 const Matrix& ticks,
double lim1,
double lim2,
140 double p1,
double p1N,
double p2,
double p2N,
141 int xyz,
bool is_3D);
143 virtual void render_tickmarks (
const Matrix& ticks,
144 double lim1,
double lim2,
145 double p1,
double p1N,
double p2,
double p2N,
146 double dx,
double dy,
double dz,
147 int xyz,
bool doubleside,
bool tickdir_both);
149 virtual void render_ticktexts (
const Matrix& ticks,
151 double lim1,
double lim2,
152 double p1,
double p2,
153 int xyz,
int ha,
int va,
154 int& wmax,
int& hmax);
156 virtual void draw_zoom_rect (
int x1,
int y1,
int x2,
int y2);
175 class patch_tessellator;
177 void init_maxlights ();
179 std::string get_string (
unsigned int id)
const;
181 bool is_nan_or_inf (
double x,
double y,
double z)
const
183 return (math::isnan (
x) || math::isnan (y)
185 || math::isinf (
x) || math::isinf (y)
189 uint8_t clip_code (
double x,
double y,
double z)
const
191 return ((
x < m_xmin ? 1 : 0)
192 | (
x > m_xmax ? 1 : 0) << 1
193 | (y < m_ymin ? 1 : 0) << 2
194 | (y > m_ymax ? 1 : 0) << 3
195 | (z < m_zmin ? 1 : 0) << 4
196 | (z > m_zmax ? 1 : 0) << 5
197 | (is_nan_or_inf (
x, y, z) ? 0 : 1) << 6);
201 double x,
double y,
double z,
double rotation);
203 void set_normal (
int bfl_mode,
const NDArray& n,
int j,
int i);
205 void set_ortho_coordinates ();
207 void restore_previous_coordinates ();
209 double points_to_pixels (
const double val)
const;
211 unsigned int make_marker_list (
const std::string& m,
double size,
214 void draw_axes_planes (
const axes::properties& props);
215 void draw_axes_boxes (
const axes::properties& props);
217 void draw_axes_grids (
const axes::properties& props);
218 void draw_axes_x_grid (
const axes::properties& props);
219 void draw_axes_y_grid (
const axes::properties& props);
220 void draw_axes_z_grid (
const axes::properties& props);
222 void draw_axes_children (
const axes::properties& props);
224 void draw_all_lights (
const base_properties& props,
225 std::list<graphics_object>& obj_list);
239 unsigned int m_marker_id, m_filled_marker_id;
250 unsigned int m_current_light;
251 unsigned int m_max_lights;