From: johanengelen Date: Wed, 18 Mar 2009 20:21:03 +0000 (+0000) Subject: partial 2geom update: disable all debug output by boolops X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8d184cd3f269d952870ae67dc86527a1486ddca0;p=inkscape.git partial 2geom update: disable all debug output by boolops --- diff --git a/src/2geom/shape.cpp b/src/2geom/shape.cpp index 64abf48ff..9ea856133 100644 --- a/src/2geom/shape.cpp +++ b/src/2geom/shape.cpp @@ -1,4 +1,40 @@ +/** + * \brief Shapes are special paths on which boolops can be performed + * + * Authors: + * Michael G. Sloan + * Nathan Hurst + * MenTaLguY + * + * Copyright 2007-2009 Authors + * + * This library is free software; you can redistribute it and/or + * modify it either under the terms of the GNU Lesser General Public + * License version 2.1 as published by the Free Software Foundation + * (the "LGPL") or, at your option, under the terms of the Mozilla + * Public License Version 1.1 (the "MPL"). If you do not alter this + * notice, a recipient may use your version of this file under either + * the MPL or the LGPL. + * + * You should have received a copy of the LGPL along with this library + * in the file COPYING-LGPL-2.1; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * You should have received a copy of the MPL along with this library + * in the file COPYING-MPL-1.1 + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY + * OF ANY KIND, either express or implied. See the LGPL or the MPL for + * the specific language governing rights and limitations. + * + */ + #include <2geom/shape.h> + #include <2geom/utils.h> #include <2geom/sweep.h> #include <2geom/ord.h> @@ -7,6 +43,8 @@ #include #include +//#define SHAPE_DEBUG // turns on debug outputting to cout. + namespace Geom { // A little sugar for appending a list to another @@ -340,7 +378,9 @@ unsigned crossing_along(double t, unsigned ix, unsigned jx, bool dir, Crossings void crossing_dual(unsigned &i, unsigned &j, CrossingSet const & crs) { Crossing cur = crs[i][j]; i = cur.getOther(i); +#ifdef SHAPE_DEBUG std::cout << i << "\n"; +#endif if(crs[i].empty()) j = 0; else @@ -429,18 +469,24 @@ std::vector inner_sanitize(std::vector const & ps) { to = crs[ix][jx]; if(dir) { // backwards +#ifdef SHAPE_DEBUG std::cout << "r" << ix << "[" << from.getTime(ix) << ", " << to.getTime(ix) << "]\n"; +#endif Path p = ps[ix].portion(from.getTime(ix), to.getTime(ix)).reverse(); for(unsigned i = 0; i < p.size(); i++) res.append(p[i], Path::STITCH_DISCONTINUOUS); } else { // forwards +#ifdef SHAPE_DEBUG std::cout << "f" << ix << "[" << from.getTime(ix) << ", " << to.getTime(ix) << "]\n"; +#endif ps[ix].appendPortionTo(res, from.getTime(ix), to.getTime(ix)); } dir = new_dir; } while(!visited[ix][jx]); +#ifdef SHAPE_DEBUG std::cout << "added " << res.size() << "\n"; +#endif result_paths.push_back(res); } for(unsigned i = 0; i < crs.size(); i++) { diff --git a/src/2geom/shape.h b/src/2geom/shape.h index bec5e2d2c..7877bea20 100644 --- a/src/2geom/shape.h +++ b/src/2geom/shape.h @@ -1,11 +1,12 @@ /** - * \file - * \brief \todo brief description + * \brief Shapes are special paths on which boolops can be performed * * Authors: - * ? - * - * Copyright ?-? authors + * Michael G. Sloan + * Nathan Hurst + * MenTaLguY + * + * Copyright 2007-2009 Authors * * This library is free software; you can redistribute it and/or * modify it either under the terms of the GNU Lesser General Public