summaryrefslogtreecommitdiffstats
path: root/src/gradient-chemistry.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2015-07-04 16:15:46 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2015-07-04 16:15:46 +0000
commit1112ab0a12fc0cb5a6b00d1bbd5b100c55eedff8 (patch)
treea91517f9165322b4e42c6cdeb4263beaedc4d02f /src/gradient-chemistry.cpp
parentPackaging. New Win32 installer Danish translation. (diff)
parentUpgrade to 2Geom r2413 (diff)
downloadinkscape-1112ab0a12fc0cb5a6b00d1bbd5b100c55eedff8.tar.gz
inkscape-1112ab0a12fc0cb5a6b00d1bbd5b100c55eedff8.zip
Sync 2Geom to revision 2413.
May introduce regressions. (bzr r14226)
Diffstat (limited to 'src/gradient-chemistry.cpp')
-rw-r--r--src/gradient-chemistry.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gradient-chemistry.cpp b/src/gradient-chemistry.cpp
index d90972961..409e9f0e6 100644
--- a/src/gradient-chemistry.cpp
+++ b/src/gradient-chemistry.cpp
@@ -1068,7 +1068,7 @@ void sp_item_gradient_set_coords(SPItem *item, GrPointType point_type, guint poi
// using X-coordinates only to determine the offset, assuming p has been snapped to the vector from begin to end.
Geom::Point begin(lg->x1.computed, lg->y1.computed);
Geom::Point end(lg->x2.computed, lg->y2.computed);
- double offset = Geom::LineSegment(begin, end).nearestPoint(p);
+ double offset = Geom::LineSegment(begin, end).nearestTime(p);
SPGradient *vector = sp_gradient_get_forked_vector_if_necessary (lg, false);
lg->ensureVector();
lg->vector.stops.at(point_i).offset = offset;
@@ -1163,7 +1163,7 @@ void sp_item_gradient_set_coords(SPItem *item, GrPointType point_type, guint poi
{
Geom::Point start = Geom::Point (rg->cx.computed, rg->cy.computed);
Geom::Point end = Geom::Point (rg->cx.computed + rg->r.computed, rg->cy.computed);
- double offset = Geom::LineSegment(start, end).nearestPoint(p);
+ double offset = Geom::LineSegment(start, end).nearestTime(p);
SPGradient *vector = sp_gradient_get_forked_vector_if_necessary (rg, false);
rg->ensureVector();
rg->vector.stops.at(point_i).offset = offset;
@@ -1180,7 +1180,7 @@ void sp_item_gradient_set_coords(SPItem *item, GrPointType point_type, guint poi
{
Geom::Point start = Geom::Point (rg->cx.computed, rg->cy.computed);
Geom::Point end = Geom::Point (rg->cx.computed, rg->cy.computed - rg->r.computed);
- double offset = Geom::LineSegment(start, end).nearestPoint(p);
+ double offset = Geom::LineSegment(start, end).nearestTime(p);
SPGradient *vector = sp_gradient_get_forked_vector_if_necessary(rg, false);
rg->ensureVector();
rg->vector.stops.at(point_i).offset = offset;