From 673b4f73495ef4deff7ac4ddc39376bf6f38cda6 Mon Sep 17 00:00:00 2001 From: johanengelen Date: Sun, 31 Aug 2008 14:52:06 +0000 Subject: [PATCH] remove unused include files and methods --- src/splivarot.cpp | 64 ----------------------------------------------- src/splivarot.h | 1 - 2 files changed, 65 deletions(-) diff --git a/src/splivarot.cpp b/src/splivarot.cpp index 0996ca538..b65e6c239 100644 --- a/src/splivarot.cpp +++ b/src/splivarot.cpp @@ -43,16 +43,10 @@ #include #include "prefs-utils.h" -#include "libnr/n-art-bpath.h" -#include "libnr/nr-path.h" #include "xml/repr.h" #include "xml/repr-sorting.h" #include <2geom/pathvector.h> -#include -#include -#include #include -#include #include "helper/geom.h" #include "livarot/Path.h" @@ -1853,64 +1847,6 @@ SPCurve* curve_for_item(SPItem *item) return curve; // do not forget to unref the curve at some point! } -Path *bpath_to_Path(NArtBpath const *bpath) -{ - Path *dest = new Path; - dest->SetBackData(false); - { - int i; - bool closed = false; - float lastX = 0.0; - float lastY = 0.0; - - for (i = 0; bpath[i].code != NR_END; i++) { - switch (bpath[i].code) { - case NR_LINETO: - lastX = bpath[i].x3; - lastY = bpath[i].y3; - { - NR::Point tmp(lastX, lastY); - dest->LineTo(tmp); - } - break; - - case NR_CURVETO: - { - NR::Point tmp, tms, tme; - tmp[0]=bpath[i].x3; - tmp[1]=bpath[i].y3; - tms[0]=3 * (bpath[i].x1 - lastX); - tms[1]=3 * (bpath[i].y1 - lastY); - tme[0]=3 * (bpath[i].x3 - bpath[i].x2); - tme[1]=3 * (bpath[i].y3 - bpath[i].y2); - dest->CubicTo(tmp,tms,tme); - } - lastX = bpath[i].x3; - lastY = bpath[i].y3; - break; - - case NR_MOVETO_OPEN: - case NR_MOVETO: - if (closed) - dest->Close(); - closed = (bpath[i].code == NR_MOVETO); - lastX = bpath[i].x3; - lastY = bpath[i].y3; - { - NR::Point tmp(lastX, lastY); - dest->MoveTo(tmp); - } - break; - default: - break; - } - } - if (closed) - dest->Close(); - } - return dest; -} - boost::optional get_nearest_position_on_Path(Path *path, NR::Point p, unsigned seg) { //get nearest position on path diff --git a/src/splivarot.h b/src/splivarot.h index 755beaa80..a4fe588ed 100644 --- a/src/splivarot.h +++ b/src/splivarot.h @@ -52,7 +52,6 @@ Geom::PathVector* pathvector_for_curve(SPItem *item, SPCurve *curve, bool doTran SPCurve *curve_for_item(SPItem *item); boost::optional get_nearest_position_on_Path(Path *path, NR::Point p, unsigned seg = 0); NR::Point get_point_on_Path(Path *path, int piece, double t); -Path *bpath_to_Path(NArtBpath const *bpath); #endif -- 2.30.2