From 7c7326a95acfd6885bf1b29d80679ea84d96c5fb Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Sun, 28 Aug 2011 23:53:33 +0200 Subject: Completely remove libnr (bzr r10582.1.11) --- src/libnr/CMakeLists.txt | 15 --------------- src/libnr/Makefile_insert | 5 ----- src/libnr/makefile.in | 17 ----------------- src/libnr/nr-point-fns.cpp | 42 ------------------------------------------ src/libnr/nr-point-fns.h | 21 --------------------- 5 files changed, 100 deletions(-) delete mode 100644 src/libnr/CMakeLists.txt delete mode 100644 src/libnr/Makefile_insert delete mode 100644 src/libnr/makefile.in delete mode 100644 src/libnr/nr-point-fns.cpp delete mode 100644 src/libnr/nr-point-fns.h (limited to 'src/libnr') 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 : -- cgit v1.2.3