summaryrefslogtreecommitdiffstats
path: root/src/live_effects/lpe-copy_rotate.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2014-11-14 19:14:04 +0000
committerJabiertxof <jtx@jtx.marker.es>2014-11-14 19:14:04 +0000
commit840daf70ff3f7c2c8e9cc0fae0037befcfa18edf (patch)
treec63e553bdacc5600983a30c11ab7bd7a31584ff1 /src/live_effects/lpe-copy_rotate.cpp
parentAdd inverse subdivision chamfer to fillet chamfer LPE, feature sugested by Iv... (diff)
downloadinkscape-840daf70ff3f7c2c8e9cc0fae0037befcfa18edf.tar.gz
inkscape-840daf70ff3f7c2c8e9cc0fae0037befcfa18edf.zip
fix a crash bug applyed on groups
(bzr r13708.1.1)
Diffstat (limited to 'src/live_effects/lpe-copy_rotate.cpp')
-rw-r--r--src/live_effects/lpe-copy_rotate.cpp11
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);