diff options
| author | Maximilian Albert <maximilian.albert@gmail.com> | 2007-08-29 13:43:29 +0000 |
|---|---|---|
| committer | cilix42 <cilix42@users.sourceforge.net> | 2007-08-29 13:43:29 +0000 |
| commit | 55646dba8a87d1a45507794a828ba5dbd90806d0 (patch) | |
| tree | 075cf578eb061f5a2e970ed56904321a95720777 /src/box3d.cpp | |
| parent | DNR bpp stuff so much (diff) | |
| download | inkscape-55646dba8a87d1a45507794a828ba5dbd90806d0.tar.gz inkscape-55646dba8a87d1a45507794a828ba5dbd90806d0.zip | |
Constrained center-dragging for 3D boxes (with Ctrl)
(bzr r3608)
Diffstat (limited to 'src/box3d.cpp')
| -rw-r--r-- | src/box3d.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/box3d.cpp b/src/box3d.cpp index 0cf0743db..5e67f46ab 100644 --- a/src/box3d.cpp +++ b/src/box3d.cpp @@ -1019,6 +1019,9 @@ sp_3dbox_new_midpoints (Box3D::Perspective3D *persp, Box3D::Axis axis, NR::Point // FIXME: cr == 1 is a degenerate case; how should we deal with it? return std::make_pair (NR::Point (0,0), NR::Point (0,0)); } + if (cr1 == NR_HUGE) { + return std::make_pair (A, B); + } Box3D::PerspectiveLine pl (M0, axis, persp); NR::Point B_new = pl.pt_with_given_cross_ratio (M0, M, cr1 / (cr1 - 1)); NR::Point A_new = pl.pt_with_given_cross_ratio (M0, M, 1 - cr2); |
