summaryrefslogtreecommitdiffstats
path: root/src/gradient-chemistry.cpp
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2007-10-16 05:09:39 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2007-10-16 05:09:39 +0000
commitd19b1a0e92ec2a24f119bdfb846b56c7ec143cce (patch)
treea6168903767c1c3d366640c5d719c9262cb9cef9 /src/gradient-chemistry.cpp
parentadd some utility functions from gradient code (diff)
downloadinkscape-d19b1a0e92ec2a24f119bdfb846b56c7ec143cce.tar.gz
inkscape-d19b1a0e92ec2a24f119bdfb846b56c7ec143cce.zip
switch to utility functions in nr-point-fns
(bzr r3906)
Diffstat (limited to 'src/gradient-chemistry.cpp')
-rw-r--r--src/gradient-chemistry.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/gradient-chemistry.cpp b/src/gradient-chemistry.cpp
index 37b50eca0..70bc835bc 100644
--- a/src/gradient-chemistry.cpp
+++ b/src/gradient-chemistry.cpp
@@ -30,6 +30,7 @@
#include "sp-text.h"
#include "sp-tspan.h"
#include <libnr/nr-matrix-fns.h>
+#include <libnr/nr-point-fns.h>
#include "xml/repr.h"
#include "svg/svg.h"
#include "svg/svg-color.h"
@@ -803,21 +804,6 @@ sp_item_gradient_reverse_vector (SPItem *item, bool fill_or_stroke)
}
-// FIXME: make general global function
-static double
-get_offset_between_points (NR::Point p, NR::Point begin, NR::Point end)
-{
- double length = NR::L2(end - begin);
- NR::Point be = (end - begin) / length;
- double r = NR::dot(p - begin, be);
-
- if (r < 0.0) return 0.0;
- if (r > length) return 1.0;
-
- return (r / length);
-}
-
-
/**
Set the position of point point_type of the gradient applied to item (either fill_or_stroke) to
p_w (in desktop coordinates). Write_repr if you want the change to become permanent.