path.cpp revision e6bdf746e2d9e775704a475a29cc1bb167ec271c
/*
* Path - Series of continuous curves
*
* Copyright 2007 MenTaLguY <mental@rydia.net>
*
* 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
*
* 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 "path.h"
#include "ord.h"
namespace Geom {
// winding determined by crossings at roots
int wind=0;
// previous time
; ++ti )
{
double t = *ti;
if ( t <= 0. || t >= 1. ) continue; //skip endpoint roots
if ( c.valueAt(t, X) > p[X] ) { // root is ray intersection
// Get t of next:
next++;
double nt;
// Check before in time and after in time for positions
// Currently we're using the average times between next and previous segs
// if y is included, these will have opposite values, giving order.
pt = t;
}
}
return wind;
}
}
}
return bounds;
}
}
return bounds;
}
template<typename iter>
for(unsigned i = 0; i < n; i++)
ret++;
return ret;
}
//This assumes that you can't be perfect in your t-vals, and as such, tweaks the start
delete v;
return;
}
if(ff != 1.) {
//fromv->setInitial(ret.finalPoint());
delete fromv;
}
} else {
}
delete tov;
}
const double eps = .1;
throw ContinuityError();
}
}
for ( int i = 0 ; i < 2 ; ++i ) {
throw ContinuityError();
}
}
}
}
{
// note: modifies the contents of [first,last)
} else {
// this approach depends on std::vector's behavior WRT iterator stability
}
}
}
}
}
delete *iter;
}
}
{
throw ContinuityError();
}
}
throw ContinuityError();
}
}
} else if ( first_replaced != last_replaced && first_replaced != curves_.begin() && last_replaced != curves_.end()-1) {
throw ContinuityError();
}
}
}
throw NotImplemented();
}
throw NotImplemented();
}
//throw NotImplemented();
}
throw NotImplemented();
}
//throw NotImplemented();
}
}
}
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(substatement-open . 0))
indent-tabs-mode:nil
c-brace-offset:0
fill-column:99
End:
vim: filetype=cpp:expandtab:shiftwidth=2:tabstop=8:softtabstop=2 :
*/