26 #if ! defined (octave_gl_render_h)
27 #define octave_gl_render_h 1
29 #include "octave-config.h"
57 void draw (
const Matrix& hlist,
bool toplevel =
false);
59 virtual void set_viewport (
int w,
int h);
61 virtual Matrix get_viewport_scaled ()
const;
65 virtual void draw_zoom_box (
int width,
int height,
66 int x1,
int y1,
int x2,
int y2,
67 const Matrix& overlaycolor,
70 double borderalpha,
double borderwidth);
72 virtual void finish ();
86 bool do_rotate =
false);
92 virtual void init_gl_context (
bool enhanced,
const Matrix& backgroundColor);
95 virtual void set_clipbox (
double x1,
double x2,
double y1,
double y2,
96 double z1,
double z2);
97 virtual void set_clipping (
bool on);
99 virtual void set_color (
const Matrix& c);
102 m_interpreter = interp;
104 virtual void set_linewidth (
float w);
105 virtual void set_linestyle (
const std::string& s,
bool stipple =
false,
106 double linewidth = 0.5);
109 virtual void set_polygon_offset (
bool on,
float offset = 0.0f);
115 virtual void init_marker (
const std::string&
m,
double size,
float width);
116 virtual void change_marker (
const std::string&
m,
double size);
117 virtual void end_marker ();
118 virtual void draw_marker (
double x,
double y,
double z,
120 const double la = 1.0,
const double fa = 1.0);
122 virtual void text_to_pixels (
const std::string& txt,
125 int halign = 0,
int valign = 0,
126 double rotation = 0.0);
128 virtual void text_to_strlist (
const std::string& txt,
129 std::list<text_renderer::string>& lst,
131 int halign = 0,
int valign = 0,
132 double rotation = 0.0);
134 virtual Matrix render_text (
const std::string& txt,
135 double x,
double y,
double z,
136 int halign,
int valign,
double rotation = 0.0);
138 virtual void render_grid (
const double linewidth,
139 const std::string& gridstyle,
140 const Matrix& gridcolor,
const double gridalpha,
141 const Matrix& ticks,
double lim1,
double lim2,
142 double p1,
double p1N,
double p2,
double p2N,
143 int xyz,
bool is_3D);
145 virtual void render_tickmarks (
const Matrix& ticks,
146 double lim1,
double lim2,
147 double p1,
double p1N,
double p2,
double p2N,
148 double dx,
double dy,
double dz,
149 int xyz,
bool doubleside);
151 virtual void render_ticktexts (
const Matrix& ticks,
153 double lim1,
double lim2,
154 double p1,
double p2,
155 int xyz,
int ha,
int va,
156 int& wmax,
int& hmax);
158 virtual void draw_zoom_rect (
int x1,
int y1,
int x2,
int y2);
177 class patch_tessellator;
179 void init_maxlights ();
181 std::string get_string (
unsigned int id)
const;
183 bool is_nan_or_inf (
double x,
double y,
double z)
const
191 uint8_t clip_code (
double x,
double y,
double z)
const
193 return ((
x < m_xmin ? 1 : 0)
194 | (
x > m_xmax ? 1 : 0) << 1
195 | (y < m_ymin ? 1 : 0) << 2
196 | (y > m_ymax ? 1 : 0) << 3
197 | (z < m_zmin ? 1 : 0) << 4
198 | (z > m_zmax ? 1 : 0) << 5
199 | (is_nan_or_inf (
x, y, z) ? 0 : 1) << 6);
203 double x,
double y,
double z,
double rotation);
205 void set_normal (
int bfl_mode,
const NDArray&
n,
int j,
int i);
207 void set_ortho_coordinates ();
209 void restore_previous_coordinates ();
211 double points_to_pixels (
const double val)
const;
213 unsigned int make_marker_list (
const std::string&
m,
double size,
227 std::list<graphics_object>& obj_list);
241 unsigned int m_marker_id, m_filled_marker_id;
252 unsigned int m_current_light;
253 unsigned int m_max_lights;
262 OCTAVE_END_NAMESPACE(
octave)
opengl_functions & m_glfcns
virtual void set_interpreter(const caseless_str &interp)
virtual void set_selecting(bool on)
virtual graphics_xform get_transform() const
virtual void set_linecap(const std::string &)
virtual void set_device_pixel_ratio(double dpr)
virtual void set_linejoin(const std::string &)
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
F77_RET_T const F77_DBLE * x
std::complex< double > w(std::complex< double > z, double relerr=0)
void draw(QDomElement &parent_elt, pdfpainter &painter)