Mercurial > octave
diff libinterp/corefcn/gl-render.h @ 22396:52c205a0ad88
Make linestyles compatible at larger linewidths (bug #48884).
* gl-render.h (set_linestyle): Change prototype to have a linewidth input.
* gl-render.h (render_grid): Change prototype to have a linewidth input.
* gl-render.cc (render_grid): Change function to have linewidth input.
Call set_linestyle with additional linewidth input.
* gl-render.cc (draw_axes_boxes, draw_axes_x_grid, draw_axes_y_grid,
draw_axes_z_grid, draw_line, draw_surface, draw_patch):
Get linewidth from axes properties.
Call set_linestyle with additional linewidth input.
* gl-render.cc (set_linestyle): Use linewdith as repetition factor in
glLineStipple. Update binary stipple patterns to get better visual results.
* gl2ps-print.cc (set_linestyle): Change function to have linewidth input.
author | Rik <rik@octave.org> |
---|---|
date | Fri, 26 Aug 2016 14:22:14 -0700 |
parents | 2b1612cf38e4 |
children | 34ce5be04942 |
line wrap: on
line diff
--- a/libinterp/corefcn/gl-render.h Fri Aug 26 16:56:37 2016 -0400 +++ b/libinterp/corefcn/gl-render.h Fri Aug 26 14:22:14 2016 -0700 @@ -80,7 +80,8 @@ virtual void set_color (const Matrix& c); virtual void set_polygon_offset (bool on, float offset = 0.0f); virtual void set_linewidth (float w); - virtual void set_linestyle (const std::string& s, bool stipple = false); + virtual void set_linestyle (const std::string& s, bool stipple = false, + double linewidth = 0.5); virtual void set_clipbox (double x1, double x2, double y1, double y2, double z1, double z2); virtual void set_clipping (bool on); @@ -115,7 +116,8 @@ virtual void draw_pixels (int w, int h, const uint8_t *data); virtual void draw_pixels (int w, int h, const uint16_t *data); - virtual void render_grid (const std::string& gridstyle, + virtual void render_grid (const double linewidth, + const std::string& gridstyle, const Matrix& gridcolor, const double gridalpha, const Matrix& ticks, double lim1, double lim2, double p1, double p1N, double p2, double p2N,