-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file layer.cpp
** \brief Layer class implementation
**
** $Id: layer.cpp,v 1.2 2005/01/24 03:08:17 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
*/
/* ========================================================================= */
/* === H E A D E R S ======================================================= */
-#define SINFG_NO_ANGLE
+#define SYNFIG_NO_ANGLE
#ifdef USING_PCH
# include "pch.h"
using namespace etl;
using namespace std;
-using namespace sinfg;
+using namespace synfig;
/* === G L O B A L S ======================================================= */
~_LayerCounter()
{
if(counter)
- sinfg::error("%d layers not yet deleted!",counter);
+ synfig::error("%d layers not yet deleted!",counter);
}
} _layer_counter;
{
_layer_book=new Book();
-#define INCLUDE_LAYER(class) sinfg::Layer::book()[sinfg::String(class::name__)]=BookEntry(class::create,class::name__,class::local_name__,class::category__,class::cvs_id__,class::version__)
-#define LAYER_ALIAS(class,alias) sinfg::Layer::book()[sinfg::String(alias)]=sinfg::Layer::BookEntry(class::create,alias,alias,_("Do Not Use"),class::cvs_id__,class::version__);
+#define INCLUDE_LAYER(class) synfig::Layer::book()[synfig::String(class::name__)]=BookEntry(class::create,class::name__,class::local_name__,class::category__,class::cvs_id__,class::version__)
+#define LAYER_ALIAS(class,alias) synfig::Layer::book()[synfig::String(alias)]=synfig::Layer::BookEntry(class::create,alias,alias,_("Do Not Use"),class::cvs_id__,class::version__);
INCLUDE_LAYER(Layer_SolidColor);
INCLUDE_LAYER(Layer_PasteCanvas);
}
Layer::LooseHandle
-sinfg::Layer::create(const String &name)
+synfig::Layer::create(const String &name)
{
if(!book().count(name))
{
return Layer::LooseHandle(layer);
}
-sinfg::Layer::~Layer()
+synfig::Layer::~Layer()
{
_LayerCounter::counter--;
while(!dynamic_param_list_.empty())
}
void
-sinfg::Layer::set_canvas(etl::loose_handle<sinfg::Canvas> x)
+synfig::Layer::set_canvas(etl::loose_handle<synfig::Canvas> x)
{
if(canvas_!=x)
{
*this,
&Layer::set_canvas
),
- etl::loose_handle<sinfg::Canvas>(0)
+ etl::loose_handle<synfig::Canvas>(0)
)
);
}
}
void
-sinfg::Layer::on_canvas_set()
+synfig::Layer::on_canvas_set()
{
}
-etl::loose_handle<sinfg::Canvas>
-sinfg::Layer::get_canvas()const
+etl::loose_handle<synfig::Canvas>
+synfig::Layer::get_canvas()const
{
return canvas_;
}
{
if(!get_canvas())
return -1;
- return get_canvas()->get_depth(const_cast<sinfg::Layer*>(this));
+ return get_canvas()->get_depth(const_cast<synfig::Layer*>(this));
}
void
}
float
-Layer::get_z_depth(const sinfg::Time& t)const
+Layer::get_z_depth(const synfig::Time& t)const
{
if(!dynamic_param_list().count("z_depth"))
return z_depth_;
return context.get_color(pos);
}
-sinfg::Layer::Handle
-Layer::hit_check(sinfg::Context context, const sinfg::Point &pos)const
+synfig::Layer::Handle
+Layer::hit_check(synfig::Context context, const synfig::Point &pos)const
{
return context.hit_check(pos);
}