Mercurial > octave
diff libinterp/corefcn/gl-render.cc @ 22363:0ca341841198
Implement "boxstyle" graphics property.
* NEWS: Announce new feature.
* gl-render.cc (draw_axes_boxes): Get graphics property "boxstyle" and
check setting before drawing front planes in a 3-D view.
* box.m: Add %!demo blocks for testing.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 22 Aug 2016 15:21:59 -0700 |
parents | f3ce0015dd42 |
children | 17c9cc85842e |
line wrap: on
line diff
--- a/libinterp/corefcn/gl-render.cc Mon Aug 22 14:30:37 2016 -0700 +++ b/libinterp/corefcn/gl-render.cc Mon Aug 22 15:21:59 2016 -0700 @@ -1177,6 +1177,7 @@ bool xySym = props.get_xySym (); bool layer2Dtop = props.get_layer2Dtop (); bool is2d = props.get_is2D (); + bool boxFull = (props.get_boxstyle () == "full"); double xPlane = props.get_xPlane (); double yPlane = props.get_yPlane (); double zPlane = props.get_zPlane (); @@ -1214,8 +1215,11 @@ { glVertex3d (xPlaneN, ypTickN, zpTickN); glVertex3d (xPlane, ypTickN, zpTickN); - glVertex3d (xPlaneN, ypTick, zpTickN); - glVertex3d (xPlane, ypTick, zpTickN); + if (boxFull) + { + glVertex3d (xPlaneN, ypTick, zpTickN); + glVertex3d (xPlane, ypTick, zpTickN); + } } } @@ -1233,8 +1237,11 @@ { glVertex3d (xpTickN, yPlaneN, zpTickN); glVertex3d (xpTickN, yPlane, zpTickN); - glVertex3d (xpTick, yPlaneN, zpTickN); - glVertex3d (xpTick, yPlane, zpTickN); + if (boxFull) + { + glVertex3d (xpTick, yPlaneN, zpTickN); + glVertex3d (xpTick, yPlane, zpTickN); + } } } @@ -1270,8 +1277,11 @@ glVertex3d (xPlaneN, yPlane, zPlane); } - glVertex3d (xPlaneN, yPlaneN, zPlaneN); - glVertex3d (xPlaneN, yPlaneN, zPlane); + if (boxFull) + { + glVertex3d (xPlaneN, yPlaneN, zPlaneN); + glVertex3d (xPlaneN, yPlaneN, zPlane); + } } }