Partially fix 1678141: value.h wasn't including OpenEXR/half.h although it uses symbo...
[synfig.git] / synfig-core / trunk / src / synfig / layer.cpp
index 24597cf..6497855 100644 (file)
@@ -1,27 +1,28 @@
-/* === 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"
@@ -57,7 +58,7 @@
 
 using namespace etl;
 using namespace std;
-using namespace sinfg;
+using namespace synfig;
 
 /* === G L O B A L S ======================================================= */
 
@@ -69,7 +70,7 @@ struct _LayerCounter
        ~_LayerCounter()
        {
                if(counter)
-                       sinfg::error("%d layers not yet deleted!",counter);
+                       synfig::error("%d layers not yet deleted!",counter);
        }
 } _layer_counter;
 
@@ -94,8 +95,8 @@ Layer::subsys_init()
 {
        _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);
@@ -126,7 +127,7 @@ Layer::Layer():
 }
 
 Layer::LooseHandle
-sinfg::Layer::create(const String &name)
+synfig::Layer::create(const String &name)
 {
        if(!book().count(name))
        {
@@ -137,7 +138,7 @@ sinfg::Layer::create(const String &name)
        return Layer::LooseHandle(layer);
 }
 
-sinfg::Layer::~Layer()
+synfig::Layer::~Layer()
 {
        _LayerCounter::counter--;
        while(!dynamic_param_list_.empty())
@@ -153,7 +154,7 @@ sinfg::Layer::~Layer()
 }
 
 void
-sinfg::Layer::set_canvas(etl::loose_handle<sinfg::Canvas> x)
+synfig::Layer::set_canvas(etl::loose_handle<synfig::Canvas> x)
 {
        if(canvas_!=x)
        {
@@ -167,7 +168,7 @@ sinfg::Layer::set_canvas(etl::loose_handle<sinfg::Canvas> x)
                                                *this,
                                                &Layer::set_canvas
                                        ),
-                                       etl::loose_handle<sinfg::Canvas>(0)
+                                       etl::loose_handle<synfig::Canvas>(0)
                                )
                        );
                }
@@ -176,12 +177,12 @@ sinfg::Layer::set_canvas(etl::loose_handle<sinfg::Canvas> x)
 }
 
 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_;
 }
@@ -191,7 +192,7 @@ Layer::get_depth()const
 {
        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
@@ -280,7 +281,7 @@ Layer::get_transform()const
 }
 
 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_;
@@ -456,8 +457,8 @@ Layer::get_color(Context context, const Point &pos)const
        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);
 }