diff options
Diffstat (limited to '')
| -rw-r--r-- | src/live_effects/lpe-copy_rotate.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/live_effects/lpe-copy_rotate.cpp b/src/live_effects/lpe-copy_rotate.cpp index e466093d3..7e3f35f9d 100644 --- a/src/live_effects/lpe-copy_rotate.cpp +++ b/src/live_effects/lpe-copy_rotate.cpp @@ -76,11 +76,12 @@ LPECopyRotate::~LPECopyRotate() void LPECopyRotate::doOnApply(SPLPEItem const* lpeitem) { - SPCurve const *curve = SP_SHAPE(lpeitem)->_curve; + using namespace Geom; - A = *(curve->first_point()); - B = *(curve->last_point()); + original_bbox(lpeitem); + Point A(boundingbox_X.min(), boundingbox_Y.middle()); + Point B(boundingbox_X.max(), boundingbox_Y.middle()); origin.param_setValue(A); dir = unit_vector(B - A); @@ -123,12 +124,14 @@ LPECopyRotate::addCanvasIndicators(SPLPEItem const */*lpeitem*/, std::vector<Geo Path path(start_pos); path.appendNew<LineSegment>((Geom::Point) origin); path.appendNew<LineSegment>(rot_pos); - + std::cout << rot_pos << "rot\n"; + std::cout << origin << "origin\n"; PathVector pathv; pathv.push_back(path); hp_vec.push_back(pathv); } + void LPECopyRotate::addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item) { { KnotHolderEntity *e = new CR::KnotHolderEntityStartingAngle(this); |
