Mercurial > octave-libgccjit
comparison src/graphics.cc @ 14395:e41e538e9d03
Fix TickDir handling for 2D and 3D plots (bug #35575).
* graphics.cc (update_ticklength): Set TickDir direction based
on 2D versus 3D.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Thu, 23 Feb 2012 12:25:23 -0800 |
parents | c9ec21bef97a |
children | 4f160344236a |
comparison
equal
deleted
inserted
replaced
14392:d17237256856 | 14395:e41e538e9d03 |
---|---|
4940 axes::properties::update_ticklength (void) | 4940 axes::properties::update_ticklength (void) |
4941 { | 4941 { |
4942 bool mode2d = (((xstate > AXE_DEPTH_DIR ? 1 : 0) + | 4942 bool mode2d = (((xstate > AXE_DEPTH_DIR ? 1 : 0) + |
4943 (ystate > AXE_DEPTH_DIR ? 1 : 0) + | 4943 (ystate > AXE_DEPTH_DIR ? 1 : 0) + |
4944 (zstate > AXE_DEPTH_DIR ? 1 : 0)) == 2); | 4944 (zstate > AXE_DEPTH_DIR ? 1 : 0)) == 2); |
4945 | |
4945 if (tickdirmode_is ("auto")) | 4946 if (tickdirmode_is ("auto")) |
4946 { | 4947 tickdir.set (mode2d ? "in" : "out", true); |
4947 // FIXME: tickdir should be updated (code below comes | 4948 |
4948 // from JHandles) | 4949 double ticksign = (tickdir_is ("in") ? -1 : 1); |
4949 //autoMode++; | |
4950 //TickDir.set(mode2d ? "in" : "out", true); | |
4951 //autoMode--; | |
4952 } | |
4953 | |
4954 //double ticksign = (tickdir_is ("in") ? -1 : 1); | |
4955 double ticksign = (tickdirmode_is ("auto") ? | |
4956 (mode2d ? -1 : 1) : | |
4957 (tickdir_is ("in") ? -1 : 1)); | |
4958 | 4950 |
4959 Matrix bbox = get_boundingbox (true); | 4951 Matrix bbox = get_boundingbox (true); |
4960 Matrix ticklen = get_ticklength ().matrix_value (); | 4952 Matrix ticklen = get_ticklength ().matrix_value (); |
4961 ticklen(0) = ticklen(0) * std::max (bbox(2), bbox(3)); | 4953 ticklen(0) = ticklen(0) * std::max (bbox(2), bbox(3)); |
4962 ticklen(1) = ticklen(1) * std::max (bbox(2), bbox(3)); | 4954 ticklen(1) = ticklen(1) * std::max (bbox(2), bbox(3)); |