X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Flayer_shape.cpp;h=1d71677955cc15a21a50383fa7ef32d93e026e73;hb=e8a065f2385c219c511b57dac52786120bfa097d;hp=6c606168b9858106691fe8755d4e0584ea131253;hpb=e3acc0b267b14fda5db3c7bbb2f218b993ef84b3;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/layer_shape.cpp b/synfig-core/trunk/src/synfig/layer_shape.cpp index 6c60616..1d71677 100644 --- a/synfig-core/trunk/src/synfig/layer_shape.cpp +++ b/synfig-core/trunk/src/synfig/layer_shape.cpp @@ -1,20 +1,21 @@ -/* === 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 */ /* ========================================================================= */ @@ -50,18 +51,18 @@ /* === 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 @@ -453,7 +454,7 @@ struct CurveArray if(dp == 0) { - sinfg::warning("polish_cubicroot: Derivative should not vanish!!!"); + synfig::warning("polish_cubicroot: Derivative should not vanish!!!"); return t; } @@ -1198,8 +1199,8 @@ Layer_Shape::get_param_vocab()const 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); @@ -1216,7 +1217,7 @@ Layer_Shape::hit_check(sinfg::Context context, const sinfg::Point &p)const 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())) @@ -1226,11 +1227,11 @@ Layer_Shape::hit_check(sinfg::Context context, const sinfg::Point &p)const return const_cast(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 @@ -1435,7 +1436,7 @@ void Layer_Shape::PolySpan::line_to(Real x, Real y) 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; } @@ -2579,7 +2580,7 @@ Layer_Shape::accelerated_render(Context context,Surface *surface,int quality, co //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; } @@ -2683,7 +2684,7 @@ Layer_Shape::render_shape(Surface *surface,bool useblend,int quality, 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;)