summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 371131a)
raw | patch | inline | side by side (parent: 371131a)
author | cilix42 <cilix42@users.sourceforge.net> | |
Mon, 19 May 2008 16:02:19 +0000 (16:02 +0000) | ||
committer | cilix42 <cilix42@users.sourceforge.net> | |
Mon, 19 May 2008 16:02:19 +0000 (16:02 +0000) |
src/live_effects/lpe-perp_bisector.cpp | patch | blob | history |
index 2fec63f3c37141f18acde4442275fca463113d03..b31ad669635c1aeb7cc86b49b2f3c174c92f3047 100644 (file)
Inkscape::LivePathEffect::LPEPerpBisector *lpe =
(Inkscape::LivePathEffect::LPEPerpBisector *) sp_lpe_item_get_livepatheffect(SP_LPE_ITEM(item));
- Geom::Point v(Geom::unit_vector(lpe->B - lpe->A));
- Geom::Point diff(lpe->M - p.to_2geom());
-
- double lambda = - v[Geom::Y] * diff[Geom::X] + v[Geom::X] * diff[Geom::Y];
+ double lambda = Geom::nearest_point(p.to_2geom(), lpe->M, lpe->perp_dir);
if (left) {
lpe->C = lpe->M + lpe->perp_dir * lambda;
lpe->length_left.param_set_value(lambda);