-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file layer_shape.cpp
** \brief Template Header
**
** $Id: layer_shape.cpp,v 1.2 2005/01/24 03:08:18 darco Exp $
**
** \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
*/
/* ========================================================================= */
/* === U S I N G =========================================================== */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(Layer_Shape);
-SINFG_LAYER_SET_NAME(Layer_Shape,"shape");
-SINFG_LAYER_SET_LOCAL_NAME(Layer_Shape,_("Shape"));
-SINFG_LAYER_SET_CATEGORY(Layer_Shape,_("Internal"));
-SINFG_LAYER_SET_VERSION(Layer_Shape,"0.1");
-SINFG_LAYER_SET_CVS_ID(Layer_Shape,"$Id: layer_shape.cpp,v 1.2 2005/01/24 03:08:18 darco Exp $");
+SYNFIG_LAYER_INIT(Layer_Shape);
+SYNFIG_LAYER_SET_NAME(Layer_Shape,"shape");
+SYNFIG_LAYER_SET_LOCAL_NAME(Layer_Shape,_("Shape"));
+SYNFIG_LAYER_SET_CATEGORY(Layer_Shape,_("Internal"));
+SYNFIG_LAYER_SET_VERSION(Layer_Shape,"0.1");
+SYNFIG_LAYER_SET_CVS_ID(Layer_Shape,"$Id: layer_shape.cpp,v 1.2 2005/01/24 03:08:18 darco Exp $");
#define EPSILON 1e-12
if(dp == 0)
{
- sinfg::warning("polish_cubicroot: Derivative should not vanish!!!");
+ synfig::warning("polish_cubicroot: Derivative should not vanish!!!");
return t;
}
return ret;
}
-sinfg::Layer::Handle
-Layer_Shape::hit_check(sinfg::Context context, const sinfg::Point &p)const
+synfig::Layer::Handle
+Layer_Shape::hit_check(synfig::Context context, const synfig::Point &p)const
{
Point pos(p-offset);
if(intersect)
{
- sinfg::Layer::Handle tmp;
+ synfig::Layer::Handle tmp;
if(get_blend_method()==Color::BLEND_BEHIND && (tmp=context.hit_check(p)))
return tmp;
if(Color::is_onto(get_blend_method()))
return const_cast<Layer_Shape*>(this);
}else if(get_blend_method() == Color::BLEND_ALPHA_OVER)
{
- sinfg::info("layer_shape::hit_check - we've got alphaover");
+ synfig::info("layer_shape::hit_check - we've got alphaover");
//if there's something in the lower layer then we're set...
if(color.get_a() < 0.1 && get_amount() > .9)
{
- sinfg::info("layer_shape::hit_check - can see through us... so nothing");
+ synfig::info("layer_shape::hit_check - can see through us... so nothing");
return Handle();
}else return context.hit_check(p);
}else
cur_y = yin;
}
}
- } catch(...) { sinfg::error("line_to: cur_x=%f, cur_y=%f, x=%f, y=%f", cur_x, cur_y, x, y); throw; }
+ } catch(...) { synfig::error("line_to: cur_x=%f, cur_y=%f, x=%f, y=%f", cur_x, cur_y, x, y); throw; }
flags |= NotClosed|NotSorted;
}
//we are done
if(cb && !cb->amount_complete(100,100))
{
- sinfg::warning("Layer_Shape: could not set amount complete");
+ synfig::warning("Layer_Shape: could not set amount complete");
return false;
}
return false;
}
- } catch(...) { sinfg::error("Layer_Shape::render_shape()1: Caught an exception after %d loops, rethrowing...", tmp); throw; }
+ } catch(...) { synfig::error("Layer_Shape::render_shape()1: Caught an exception after %d loops, rethrowing...", tmp); throw; }
//transfer all the data - RLE optimized
for(curnum=0; curnum < number;)