26 #if ! defined (octave_gl_render_h)
27 #define octave_gl_render_h 1
29 #include "octave-config.h"
36 class opengl_functions;
61 void draw (
const Matrix& hlist,
bool toplevel =
false);
63 virtual void set_viewport (
int w,
int h);
65 virtual Matrix get_viewport_scaled (
void)
const;
69 virtual void draw_zoom_box (
int width,
int height,
70 int x1,
int y1,
int x2,
int y2,
71 const Matrix& overlaycolor,
74 double borderalpha,
double borderwidth);
76 virtual void finish (
void);
88 bool do_rotate =
false);
94 virtual void init_gl_context (
bool enhanced,
const Matrix& backgroundColor);
97 virtual void set_clipbox (
double x1,
double x2,
double y1,
double y2,
98 double z1,
double z2);
99 virtual void set_clipping (
bool on);
101 virtual void set_color (
const Matrix& c);
106 virtual void set_linewidth (
float w);
107 virtual void set_linestyle (
const std::string& s,
bool stipple =
false,
108 double linewidth = 0.5);
111 virtual void set_polygon_offset (
bool on,
float offset = 0.0f);
117 virtual void init_marker (
const std::string&
m,
double size,
float width);
118 virtual void end_marker (
void);
119 virtual void draw_marker (
double x,
double y,
double z,
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,
double lim1,
double lim2,
146 double p1,
double p1N,
double p2,
double p2N,
147 double dx,
double dy,
double dz,
148 int xyz,
bool doubleside);
150 virtual void render_ticktexts (
const Matrix& ticks,
152 double lim1,
double lim2,
153 double p1,
double p2,
154 int xyz,
int ha,
int va,
155 int& wmax,
int& hmax);
157 virtual void draw_zoom_rect (
int x1,
int y1,
int x2,
int y2);
161 void init_maxlights (
void);
163 std::string get_string (
unsigned int id)
const;
175 return ((
x <
xmin ? 1 : 0)
176 | (
x >
xmax ? 1 : 0) << 1
177 | (y < ymin ? 1 : 0) << 2
178 | (y > ymax ? 1 : 0) << 3
179 | (z < zmin ? 1 : 0) << 4
180 | (z > zmax ? 1 : 0) << 5
184 void set_normal (
int bfl_mode,
const NDArray&
n,
int j,
int i);
186 double points_to_pixels (
const double val)
const;
188 unsigned int make_marker_list (
const std::string&
m,
double size,
202 std::list<graphics_object>& obj_list);
unsigned int filled_marker_id
virtual void set_interpreter(const caseless_str &interp)
opengl_functions & get_opengl_functions(void) const
bool is_nan_or_inf(double x, double y, double z) const
opengl_functions & m_glfcns
unsigned int m_max_lights
virtual void set_linejoin(const std::string &)
unsigned int m_current_light
virtual graphics_xform get_transform(void) const
virtual ~opengl_renderer(void)=default
uint8_t clip_code(double x, double y, double z) const
text_renderer txt_renderer
virtual void set_device_pixel_ratio(double dpr)
virtual void set_linecap(const std::string &)
virtual void set_selecting(bool on)
opengl_renderer(const opengl_renderer &)=delete
void xform(ColumnVector &v, const Matrix &m)
F77_RET_T const F77_DBLE * x
std::complex< double > w(std::complex< double > z, double relerr=0)
static bool is_nan_or_inf(const octave_value &val)
octave_int< T > xmin(const octave_int< T > &x, const octave_int< T > &y)
octave_int< T > xmax(const octave_int< T > &x, const octave_int< T > &y)
void draw(QDomElement &parent_elt, pdfpainter &painter)