diff options
| author | Thomas Holder <speleo3@users.sourceforge.net> | 2008-12-20 10:12:04 +0000 |
|---|---|---|
| committer | speleo3 <speleo3@users.sourceforge.net> | 2008-12-20 10:12:04 +0000 |
| commit | 00b0f245b05292b755cd7520933f424e12f0ee38 (patch) | |
| tree | 407a1f65e007449c4b9de2a3dbbd894430baeb5a /src/object-snapper.cpp | |
| parent | lower limit on linewidth (diff) | |
| download | inkscape-00b0f245b05292b755cd7520933f424e12f0ee38.tar.gz inkscape-00b0f245b05292b755cd7520933f424e12f0ee38.zip | |
object-snapper.cpp
* fix snapping to clip/mask with parent transform
* replace matrix_to_desktop call
sp-item.h
sp-item.cpp
* improve snapping to clip/mask with parent transform
* remove matrix_to_desktop/matrix_from_desktop
* use desktop->doc2dt() with sp_item_i2d_affine(...)
desktop.h
desktop.cpp
* new method: dt2doc()
selection-chemistry.cpp
* remove awkward matrix_to_desktop(matrix_from_desktop(...)) calls
(bzr r7016)
Diffstat (limited to 'src/object-snapper.cpp')
| -rw-r--r-- | src/object-snapper.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/object-snapper.cpp b/src/object-snapper.cpp index 922c35bcb..cf10ab5e2 100644 --- a/src/object-snapper.cpp +++ b/src/object-snapper.cpp @@ -112,25 +112,19 @@ void Inkscape::ObjectSnapper::_findCandidates(SPObject* parent, if (it == NULL || i == it->end()) { SPItem *item = SP_ITEM(o); - Geom::Matrix transform = Geom::identity(); if (item) { SPObject *obj = NULL; - if (clip_or_mask) { // If the current item is a clipping path or a mask - // then store the transformation of the clipped path or mask itself - // but also take into account the additional affine of the object - // being clipped / masked - transform = to_2geom(item->transform) * additional_affine; - } else { // cannot clip or mask more than once + if (!clip_or_mask) { // cannot clip or mask more than once // The current item is not a clipping path or a mask, but might // still be the subject of clipping or masking itself ; if so, then // we should also consider that path or mask for snapping to obj = SP_OBJECT(item->clip_ref->getObject()); if (obj) { - _findCandidates(obj, it, false, bbox_to_snap, snap_dim, true, item->transform); + _findCandidates(obj, it, false, bbox_to_snap, snap_dim, true, sp_item_i2doc_affine(item)); } obj = SP_OBJECT(item->mask_ref->getObject()); if (obj) { - _findCandidates(obj, it, false, bbox_to_snap, snap_dim, true, item->transform); + _findCandidates(obj, it, false, bbox_to_snap, snap_dim, true, sp_item_i2doc_affine(item)); } } } @@ -144,7 +138,7 @@ void Inkscape::ObjectSnapper::_findCandidates(SPObject* parent, // insert an additional transformation in document coordinates (code copied from sp_item_i2d_affine) sp_item_invoke_bbox(item, bbox_of_item, - sp_item_i2doc_affine(item) * matrix_to_desktop(additional_affine, item), + sp_item_i2doc_affine(item) * additional_affine * _snapmanager->getDesktop()->doc2dt(), true); } else { sp_item_invoke_bbox(item, bbox_of_item, sp_item_i2d_affine(item), true); |
