26 #if ! defined (octave_gl_render_h)
27 #define octave_gl_render_h 1
29 #include "octave-config.h"
56 virtual void draw (
const graphics_object& go,
bool toplevel =
true);
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);
90 bool do_rotate =
false);
93 const graphics_object& go);
95 const graphics_object& go);
96 virtual void init_gl_context (
bool enhanced,
const Matrix& backgroundColor);
99 virtual void set_clipbox (
double x1,
double x2,
double y1,
double y2,
100 double z1,
double z2);
101 virtual void set_clipping (
bool on);
102 virtual void set_font (
const base_properties& props);
103 virtual void set_color (
const Matrix& c);
106 m_interpreter = interp;
108 virtual void set_linewidth (
float w);
109 virtual void set_linestyle (
const std::string& s,
bool stipple =
false,
110 double linewidth = 0.5);
113 virtual void set_polygon_offset (
bool on,
float offset = 0.0f);
119 virtual void init_marker (
const std::string&
m,
double size,
float width);
120 virtual void change_marker (
const std::string&
m,
double size);
121 virtual void end_marker (
void);
122 virtual void draw_marker (
double x,
double y,
double z,
124 const double la = 1.0,
const double fa = 1.0);
126 virtual void text_to_pixels (
const std::string& txt,
129 int halign = 0,
int valign = 0,
130 double rotation = 0.0);
132 virtual void text_to_strlist (
const std::string& txt,
133 std::list<text_renderer::string>& lst,
135 int halign = 0,
int valign = 0,
136 double rotation = 0.0);
138 virtual Matrix render_text (
const std::string& txt,
139 double x,
double y,
double z,
140 int halign,
int valign,
double rotation = 0.0);
142 virtual void render_grid (
const double linewidth,
143 const std::string& gridstyle,
144 const Matrix& gridcolor,
const double gridalpha,
145 const Matrix& ticks,
double lim1,
double lim2,
146 double p1,
double p1N,
double p2,
double p2N,
147 int xyz,
bool is_3D);
149 virtual void render_tickmarks (
const Matrix& ticks,
150 double lim1,
double lim2,
151 double p1,
double p1N,
double p2,
double p2N,
152 double dx,
double dy,
double dz,
153 int xyz,
bool doubleside);
155 virtual void render_ticktexts (
const Matrix& ticks,
157 double lim1,
double lim2,
158 double p1,
double p2,
159 int xyz,
int ha,
int va,
160 int& wmax,
int& hmax);
162 virtual void draw_zoom_rect (
int x1,
int y1,
int x2,
int y2);
183 void init_maxlights (
void);
185 std::string get_string (
unsigned int id)
const;
197 return ((
x < m_xmin ? 1 : 0)
198 | (
x > m_xmax ? 1 : 0) << 1
199 | (y < m_ymin ? 1 : 0) << 2
200 | (y > m_ymax ? 1 : 0) << 3
201 | (z < m_zmin ? 1 : 0) << 4
202 | (z > m_zmax ? 1 : 0) << 5
207 double x,
double y,
double z,
double rotation);
209 void set_normal (
int bfl_mode,
const NDArray&
n,
int j,
int i);
211 void set_ortho_coordinates (
void);
213 void restore_previous_coordinates (
void);
215 double points_to_pixels (
const double val)
const;
217 unsigned int make_marker_list (
const std::string&
m,
double size,
230 void draw_all_lights (
const base_properties& props,
231 std::list<graphics_object>& obj_list);
opengl_functions & operator=(const opengl_functions &)=default
virtual graphics_xform get_transform(void) const
virtual ~opengl_renderer(void)=default
opengl_functions & m_glfcns
caseless_str m_interpreter
ColumnVector m_camera_dir
unsigned int m_current_light
text_renderer m_txt_renderer
graphics_toolkit m_toolkit
uint8_t clip_code(double x, double y, double z) const
virtual void set_interpreter(const caseless_str &interp)
virtual void set_selecting(bool on)
opengl_renderer(const opengl_renderer &)=delete
unsigned int m_filled_marker_id
unsigned int m_max_lights
virtual void set_linecap(const std::string &)
bool is_nan_or_inf(double x, double y, double z) const
virtual void set_device_pixel_ratio(double dpr)
opengl_functions & get_opengl_functions(void) const
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)
T::properties & properties(graphics_object obj)
static bool is_nan_or_inf(const octave_value &val)
void draw(QDomElement &parent_elt, pdfpainter &painter)