diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2011-08-28 21:53:33 +0000 |
|---|---|---|
| committer | Krzysztof Kosinski <tweenk.pl@gmail.com> | 2011-08-28 21:53:33 +0000 |
| commit | 7c7326a95acfd6885bf1b29d80679ea84d96c5fb (patch) | |
| tree | a64cfe0dc6abdea48a15585594cebb6a8368cf90 /src/libnr | |
| parent | Remove nr-object.h and nr-macros.h (diff) | |
| download | inkscape-7c7326a95acfd6885bf1b29d80679ea84d96c5fb.tar.gz inkscape-7c7326a95acfd6885bf1b29d80679ea84d96c5fb.zip | |
Completely remove libnr
(bzr r10582.1.11)
Diffstat (limited to 'src/libnr')
| -rw-r--r-- | src/libnr/CMakeLists.txt | 15 | ||||
| -rw-r--r-- | src/libnr/Makefile_insert | 5 | ||||
| -rw-r--r-- | src/libnr/makefile.in | 17 | ||||
| -rw-r--r-- | src/libnr/nr-point-fns.cpp | 42 | ||||
| -rw-r--r-- | src/libnr/nr-point-fns.h | 21 |
5 files changed, 0 insertions, 100 deletions
diff --git a/src/libnr/CMakeLists.txt b/src/libnr/CMakeLists.txt deleted file mode 100644 index 0adea96f0..000000000 --- a/src/libnr/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ - -set(nr_SRC - nr-object.cpp - nr-point-fns.cpp - nr-values.cpp - - # ------- - # Headers - nr-macros.h - nr-object.h - nr-point-fns.h - nr-values.h -) - -add_inkscape_lib(nr_LIB "${nr_SRC}") diff --git a/src/libnr/Makefile_insert b/src/libnr/Makefile_insert deleted file mode 100644 index 487f34be1..000000000 --- a/src/libnr/Makefile_insert +++ /dev/null @@ -1,5 +0,0 @@ -## Makefile.am fragment sourced by src/Makefile.am. - -ink_common_sources += \ - libnr/nr-point-fns.cpp \ - libnr/nr-point-fns.h diff --git a/src/libnr/makefile.in b/src/libnr/makefile.in deleted file mode 100644 index 9f8d3919e..000000000 --- a/src/libnr/makefile.in +++ /dev/null @@ -1,17 +0,0 @@ -# Convenience stub makefile to call the real Makefile. - -@SET_MAKE@ - -OBJEXT = @OBJEXT@ - -# Explicit so that it's the default rule. -all: - cd .. && $(MAKE) libnr/all - -clean %.a %.$(OBJEXT): - cd .. && $(MAKE) libnr/$@ - -.PHONY: all clean - -.SUFFIXES: -.SUFFIXES: .a .$(OBJEXT) diff --git a/src/libnr/nr-point-fns.cpp b/src/libnr/nr-point-fns.cpp deleted file mode 100644 index e4fb8cf0b..000000000 --- a/src/libnr/nr-point-fns.cpp +++ /dev/null @@ -1,42 +0,0 @@ -#include "libnr/nr-point-fns.h" - -Geom::Point -snap_vector_midpoint (Geom::Point const &p, Geom::Point const &begin, Geom::Point const &end, double snap) -{ - double length = Geom::distance(begin, end); - Geom::Point be = (end - begin) / length; - double r = Geom::dot(p - begin, be); - - if (r < 0.0) return begin; - if (r > length) return end; - - double snapdist = length * snap; - double r_snapped = (snap==0) ? r : floor(r/(snapdist + 0.5)) * snapdist; - - return (begin + r_snapped * be); -} - -// equivalent to Geom::LineSegment(begin, end).nearestPoint(p) -double -get_offset_between_points (Geom::Point const &p, Geom::Point const &begin, Geom::Point const &end) -{ - double length = Geom::distance(begin, end); - Geom::Point be = (end - begin) / length; - double r = Geom::dot(p - begin, be); - - if (r < 0.0) return 0.0; - if (r > length) return 1.0; - - return (r / length); -} - -/* - Local Variables: - mode:c++ - c-file-style:"stroustrup" - c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) - indent-tabs-mode:nil - fill-column:99 - End: -*/ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/libnr/nr-point-fns.h b/src/libnr/nr-point-fns.h deleted file mode 100644 index 036c943f1..000000000 --- a/src/libnr/nr-point-fns.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef __NR_POINT_OPS_H__ -#define __NR_POINT_OPS_H__ - -#include <2geom/point.h> - -Geom::Point snap_vector_midpoint (Geom::Point const &p, Geom::Point const &begin, Geom::Point const &end, double snap); - -double get_offset_between_points (Geom::Point const &p, Geom::Point const &begin, Geom::Point const &end); - -#endif /* !__NR_POINT_OPS_H__ */ - -/* - Local Variables: - mode:c++ - c-file-style:"stroustrup" - c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) - indent-tabs-mode:nil - fill-column:99 - End: -*/ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : |
