summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f93030a)
raw | patch | inline | side by side (parent: f93030a)
author | cilix42 <cilix42@users.sourceforge.net> | |
Mon, 4 Aug 2008 14:12:27 +0000 (14:12 +0000) | ||
committer | cilix42 <cilix42@users.sourceforge.net> | |
Mon, 4 Aug 2008 14:12:27 +0000 (14:12 +0000) |
src/live_effects/lpe-perp_bisector.cpp | patch | blob | history |
index b13e2853434e53e422189c71652c328db61964e2..ac720b88b2c874a17a8ee3d1d774ed40d8ba95c0 100644 (file)
bisector_end_set(p, false);
}
-/**
-Geom::Point path_start_get(SPItem *item) {
- Inkscape::LivePathEffect::LPEPerpBisector *lpe =
- dynamic_cast<Inkscape::LivePathEffect::LPEPerpBisector *> (sp_lpe_item_get_current_lpe(SP_LPE_ITEM(item)));
-
- if (lpe)
- return Geom::Point(lpe->A);
- else
- return Geom::Point(0,0);
-}
-
-Geom::Point path_end_get(SPItem *item) {
- Inkscape::LivePathEffect::LPEPerpBisector *lpe =
- dynamic_cast<Inkscape::LivePathEffect::LPEPerpBisector *> (sp_lpe_item_get_current_lpe(SP_LPE_ITEM(item)));
-
- if (lpe)
- return Geom::Point(lpe->B);
- else
- return Geom::Point(0,0);
-}
-
-void
-path_set_start_end(SPItem *item, Geom::Point const &p, bool start) {
- SPCurve* curve = sp_path_get_curve_for_edit (SP_PATH(item)); // TODO: Should we use sp_shape_get_curve()?
- Geom::Matrix const i2d (sp_item_i2d_affine (SP_ITEM(item)));
-
- Geom::Point A, B;
- if (start) {
- A = p;
- B = curve->last_point();
- } else {
- A = curve->first_point();
- B = p;
- }
-
- SPCurve *c = new SPCurve();
- c->moveto(A);
- c->lineto(B);
- sp_path_set_original_curve(SP_PATH(item), c, TRUE, true);
- c->unref();
-}
-**/
-
-//void path_start_set(SPItem *item, Geom::Point const &p, Geom::Point const &/*origin*/, guint /*state*/) {
-// path_set_start_end(item, p);
-//}
-
-//void path_end_set(SPItem *item, Geom::Point const &p, Geom::Point const &/*origin*/, guint /*state*/) {
-// path_set_start_end(item, p, false);
-//}
-
} //namescape PB
LPEPerpBisector::LPEPerpBisector(LivePathEffectObject *lpeobject) :
registerKnotHolderHandle(new PB::KnotHolderEntityLeftEnd(), _("Adjust the bisector's \"left\" end"));
registerKnotHolderHandle(new PB::KnotHolderEntityRightEnd(), _("Adjust the bisector's \"right\" end"));
-/**
- registerKnotHolderHandle(path_start_set, path_start_get);
- registerKnotHolderHandle(path_end_set, path_end_get);
- registerKnotHolderHandle(bisector_left_end_set, bisector_left_end_get);
- registerKnotHolderHandle(bisector_right_end_set, bisector_right_end_get);
-**/
}
LPEPerpBisector::~LPEPerpBisector()