Remove .gitignore do nothing is ignored.
[synfig.git] / synfig-core / trunk / src / modules / mod_filter / halftone3.cpp
index 64dd274..a2a4283 100644 (file)
@@ -1,11 +1,12 @@
 /* === S Y N F I G ========================================================= */
 /*!    \file halftone3.cpp
-**     \brief blehh
+**     \brief Implementation of the "Halftone 3" layer
 **
-**     $Id: halftone3.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
+**     $Id$
 **
 **     \legal
 **     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+**     Copyright (c) 2007-2008 Chris Moore
 **
 **     This package is free software; you can redistribute it and/or
 **     modify it under the terms of the GNU General Public License as
@@ -53,10 +54,10 @@ using namespace etl;
 
 SYNFIG_LAYER_INIT(Halftone3);
 SYNFIG_LAYER_SET_NAME(Halftone3,"halftone3");
-SYNFIG_LAYER_SET_LOCAL_NAME(Halftone3,_("Halftone3"));
-SYNFIG_LAYER_SET_CATEGORY(Halftone3,_("Filters"));
+SYNFIG_LAYER_SET_LOCAL_NAME(Halftone3,N_("Halftone 3"));
+SYNFIG_LAYER_SET_CATEGORY(Halftone3,N_("Filters"));
 SYNFIG_LAYER_SET_VERSION(Halftone3,"0.0");
-SYNFIG_LAYER_SET_CVS_ID(Halftone3,"$Id: halftone3.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
+SYNFIG_LAYER_SET_CVS_ID(Halftone3,"$Id$");
 
 /* === P R O C E D U R E S ================================================= */
 
@@ -74,7 +75,7 @@ Halftone3::Halftone3()
        {
                tone[i].size=size;
                tone[i].type=type;
-               tone[i].offset=(synfig::Point(0,0));
+               tone[i].origin=(synfig::Point(0,0));
                tone[i].angle=Angle::deg(30.0)*(float)i;
        }
 
@@ -229,13 +230,13 @@ Halftone3::color_func(const Point &point, float supersample,const Color& in_colo
 }
 
 inline float
-Halftone3::calc_supersample(const synfig::Point &x, float pw,float ph)const
+Halftone3::calc_supersample(const synfig::Point &/*x*/, float pw,float /*ph*/)const
 {
        return abs(pw/(tone[0].size).mag());
 }
 
 synfig::Layer::Handle
-Halftone3::hit_check(synfig::Context context, const synfig::Point &point)const
+Halftone3::hit_check(synfig::Context /*context*/, const synfig::Point &/*point*/)const
 {
        return const_cast<Halftone3*>(this);
 }
@@ -253,13 +254,17 @@ Halftone3::set_param(const String & param, const ValueBase &value)
        IMPORT_PLUS(subtractive,sync());
 
        IMPORT(tone[0].angle);
-       IMPORT(tone[0].offset);
+       IMPORT(tone[0].origin);
 
        IMPORT(tone[1].angle);
-       IMPORT(tone[1].offset);
+       IMPORT(tone[1].origin);
 
        IMPORT(tone[2].angle);
-       IMPORT(tone[2].offset);
+       IMPORT(tone[2].origin);
+
+       IMPORT_AS(tone[0].origin,"tone[0].offset");
+       IMPORT_AS(tone[1].origin,"tone[1].offset");
+       IMPORT_AS(tone[2].origin,"tone[2].offset");
 
        return Layer_Composite::set_param(param,value);
 }
@@ -277,13 +282,13 @@ Halftone3::get_param(const String & param)const
        EXPORT(subtractive);
 
        EXPORT(tone[0].angle);
-       EXPORT(tone[0].offset);
+       EXPORT(tone[0].origin);
 
        EXPORT(tone[1].angle);
-       EXPORT(tone[1].offset);
+       EXPORT(tone[1].origin);
 
        EXPORT(tone[2].angle);
-       EXPORT(tone[2].offset);
+       EXPORT(tone[2].origin);
 
        EXPORT_NAME();
        EXPORT_VERSION();
@@ -320,13 +325,13 @@ Halftone3::get_param_vocab()const
                        .set_local_name(chan_name+_(" Color"))
                );
 
-               ret.push_back(ParamDesc(strprintf("tone[%d].offset",i))
-                       .set_local_name(chan_name+_(" Mask Offset"))
+               ret.push_back(ParamDesc(strprintf("tone[%d].origin",i))
+                       .set_local_name(chan_name+_(" Mask Origin"))
                        .set_is_distance()
                );
                ret.push_back(ParamDesc(strprintf("tone[%d].angle",i))
                        .set_local_name(chan_name+_(" Mask Angle"))
-                       .set_origin(strprintf("tone[%d].offset",i))
+                       .set_origin(strprintf("tone[%d].origin",i))
                );
        }