X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fsynfigapp%2Fblineconvert.h;h=c6f6fbd74e4ca9efa0dd989b75af37b2dfbf351f;hb=312541920425e9ca481a0218c440f369dd25306f;hp=519a2781776882a1f318105e64cb0713f63ec82a;hpb=02252941b29de64037116f4d37991a38d9ff0d94;p=synfig.git diff --git a/synfig-studio/trunk/src/synfigapp/blineconvert.h b/synfig-studio/trunk/src/synfigapp/blineconvert.h index 519a278..c6f6fbd 100644 --- a/synfig-studio/trunk/src/synfigapp/blineconvert.h +++ b/synfig-studio/trunk/src/synfigapp/blineconvert.h @@ -2,19 +2,20 @@ /*! \file blineconvert.h ** \brief Template Header ** -** $Id: blineconvert.h,v 1.1.1.1 2005/01/07 03:34:37 darco Exp $ +** $Id$ ** ** \legal -** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley ** -** This software and associated documentation -** are CONFIDENTIAL and PROPRIETARY property of -** the above-mentioned copyright holder. +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. ** -** You may not copy, print, publish, or in any -** other way distribute this software without -** a prior written agreement with -** the copyright holder. +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. ** \endlegal */ /* ========================================================================= */ @@ -38,7 +39,7 @@ /* === C L A S S E S & S T R U C T S ======================================= */ namespace synfigapp { - + class BLineConverter { public: @@ -47,15 +48,15 @@ public: int curind; synfig::Real tangentscale; synfig::Real error; //negative error will indicate invalid; - - cpindex(int ci, synfig::Real s=0, synfig::Real e=-1) - :curind(ci), tangentscale(s), error(e) + + cpindex(int ci, synfig::Real s=0, synfig::Real e=-1) + :curind(ci), tangentscale(s), error(e) {} - + cpindex(const cpindex & o) - :curind(o.curind), tangentscale(o.tangentscale), error(o.error) + :curind(o.curind), tangentscale(o.tangentscale), error(o.error) {} - + const cpindex & operator = (const cpindex & rhs) { curind = rhs.curind; @@ -63,12 +64,12 @@ public: error = rhs.error; return *this; } - + bool operator < (const cpindex &rhs) const { - return curind < rhs.curind; + return curind < rhs.curind; } - + //point is obviously in[curind] //tangent scale will get reset to the smallest (or something else depending on experimentation) }; @@ -80,18 +81,18 @@ private: //temporary point storage for vector calc std::vector ftemp; - - std::vector df; //the derivative cache + + std::vector df; //the derivative cache std::vector cvt; //the curvature cache - + std::vector brk; //the break point cache - + std::vector di, //cumulative distance d_i; //distance between adjacent segments - + std::vector work; //the working point cache for the entire curve std::vector curind; - + //function parameters void clear(); @@ -107,7 +108,7 @@ public: static void EnforceMinWidth(std::list &bline, synfig::Real min_pressure); void operator ()(std::list &out, const std::list &in,const std::list &in_w); }; - + }; // END of namespace synfigapp /* === E N D =============================================================== */