summaryrefslogtreecommitdiffstats
path: root/src/perspective3d.cpp
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2007-09-11 12:25:12 +0000
committercilix42 <cilix42@users.sourceforge.net>2007-09-11 12:25:12 +0000
commit3916b60702abf416c04a3dae2e62ca556b40a082 (patch)
tree2200ba21e2e8a4bd1ab3cd2b2c412bb62d12a160 /src/perspective3d.cpp
parentadd select all, select all in all layers, deselect to selector toolbar (diff)
downloadinkscape-3916b60702abf416c04a3dae2e62ca556b40a082.tar.gz
inkscape-3916b60702abf416c04a3dae2e62ca556b40a082.zip
Use angle step from prefs for rotation of PLs; Alt+parentheses rotate PLs by (constant) small amount
(bzr r3720)
Diffstat (limited to 'src/perspective3d.cpp')
-rw-r--r--src/perspective3d.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/perspective3d.cpp b/src/perspective3d.cpp
index db4f564c7..3c7529c16 100644
--- a/src/perspective3d.cpp
+++ b/src/perspective3d.cpp
@@ -204,12 +204,13 @@ Perspective3D::set_infinite_direction (Box3D::Axis axis, NR::Point const dir)
}
void
-Perspective3D::rotate (Box3D::Axis const axis, double const angle)
+Perspective3D::rotate (Box3D::Axis const axis, double const angle, bool const alt_pressed)
{
Box3D::VanishingPoint *vp = get_vanishing_point (axis);
if (!vp->is_finite()) {
+ double add_value = angle;
double a = NR::atan2 (vp->v_dir) * 180/M_PI;
- a += angle;
+ a += alt_pressed ? 0.5 * ((angle > 0 ) - (angle < 0)) : angle; // the r.h.s. yields +/-0.5 or angle
a *= M_PI/180;
this->set_infinite_direction (axis, NR::Point (cos (a), sin (a)));
}