diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2008-05-01 18:24:38 +0000 |
|---|---|---|
| committer | dvlierop2 <dvlierop2@users.sourceforge.net> | 2008-05-01 18:24:38 +0000 |
| commit | 9a01f98c2d7928f45950165350dd8c93da617a84 (patch) | |
| tree | f40e4f5cfce70d84aa5dc6e6891d97c4d1d63589 /src/seltrans.cpp | |
| parent | copyediting (diff) | |
| download | inkscape-9a01f98c2d7928f45950165350dd8c93da617a84.tar.gz inkscape-9a01f98c2d7928f45950165350dd8c93da617a84.zip | |
Replace freeSnapSkew() by constrainedSnapSkew(). There is no such thing as freely snapping while skewing; snapping will always be constrained
(bzr r5569)
Diffstat (limited to 'src/seltrans.cpp')
| -rw-r--r-- | src/seltrans.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/seltrans.cpp b/src/seltrans.cpp index db1135785..3c333c11b 100644 --- a/src/seltrans.cpp +++ b/src/seltrans.cpp @@ -1150,15 +1150,15 @@ gboolean Inkscape::SelTrans::skewRequest(SPSelTransHandle const &handle, NR::Poi SnapManager &m = _desktop->namedview->snap_manager; m.setup(NULL, _items_const); - //TODO: While skewing, scaling in the opposite direction by integer multiples is also allowed. This is not handled though by freeSnapSkew / _snapTransformed yet! - //TODO: We need a constrainedSnapSkew instead of a freeSnapSkew - Inkscape::SnappedPoint bb = m.freeSnapSkew(Inkscape::Snapper::SNAPPOINT_BBOX, _bbox_points, skew[dim_a], _origin, dim_b); - Inkscape::SnappedPoint sn = m.freeSnapSkew(Inkscape::Snapper::SNAPPOINT_NODE, _snap_points, skew[dim_a], _origin, dim_b); + Inkscape::Snapper::ConstraintLine const constraint(component_vectors[dim_b]); + NR::Point const s(skew[dim_a], scale[dim_a]); + Inkscape::SnappedPoint bb = m.constrainedSnapSkew(Inkscape::Snapper::SNAPPOINT_BBOX, _bbox_points, constraint, s, _origin, dim_b); + Inkscape::SnappedPoint sn = m.constrainedSnapSkew(Inkscape::Snapper::SNAPPOINT_NODE, _snap_points, constraint, s, _origin, dim_b); if (bb.getSnapped() || sn.getSnapped()) { // We snapped something, so change the skew to reflect it - NR::Coord const bd = bb.getSnapped() ? bb.getTransformation()[dim_b] : NR_HUGE; - NR::Coord const sd = sn.getSnapped() ? sn.getTransformation()[dim_b] : NR_HUGE; + NR::Coord const bd = bb.getSnapped() ? bb.getTransformation()[0] : NR_HUGE; + NR::Coord const sd = sn.getSnapped() ? sn.getTransformation()[0] : NR_HUGE; if (bd < sd) { _desktop->snapindicator->set_new_snappoint(bb); skew[dim_a] = bd; |
