Removed trailing whitespace.
[synfig.git] / synfig-core / trunk / src / synfig / layer_motionblur.cpp
index 38287bb..236ef3a 100644 (file)
@@ -1,20 +1,21 @@
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
 /*!    \file layer_motionblur.h
 **     \brief Template Header
 **
 **     $Id: layer_motionblur.cpp,v 1.1.1.1 2005/01/04 01:23:14 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 etl;
 using namespace std;
 
 /* === G L O B A L S ======================================================= */
 
-SINFG_LAYER_INIT(Layer_MotionBlur);
-SINFG_LAYER_SET_NAME(Layer_MotionBlur,"MotionBlur");
-SINFG_LAYER_SET_LOCAL_NAME(Layer_MotionBlur,_("Motion Blur"));
-SINFG_LAYER_SET_CATEGORY(Layer_MotionBlur,_("Blurs"));
-SINFG_LAYER_SET_VERSION(Layer_MotionBlur,"0.1");
-SINFG_LAYER_SET_CVS_ID(Layer_MotionBlur,"$Id: layer_motionblur.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $");
+SYNFIG_LAYER_INIT(Layer_MotionBlur);
+SYNFIG_LAYER_SET_NAME(Layer_MotionBlur,"MotionBlur");
+SYNFIG_LAYER_SET_LOCAL_NAME(Layer_MotionBlur,_("Motion Blur"));
+SYNFIG_LAYER_SET_CATEGORY(Layer_MotionBlur,_("Blurs"));
+SYNFIG_LAYER_SET_VERSION(Layer_MotionBlur,"0.1");
+SYNFIG_LAYER_SET_CVS_ID(Layer_MotionBlur,"$Id: layer_motionblur.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $");
 
 /* === M E M B E R S ======================================================= */
 
@@ -63,12 +64,12 @@ Layer_MotionBlur::Layer_MotionBlur():
        aperture                (0)
 {
 }
-       
+
 bool
 Layer_MotionBlur::set_param(const String &param, const ValueBase &value)
 {
 
-       IMPORT(aperture);               
+       IMPORT(aperture);
        return Layer_Composite::set_param(param,value);
 }
 
@@ -76,10 +77,10 @@ ValueBase
 Layer_MotionBlur::get_param(const String &param)const
 {
        EXPORT(aperture);
-       
+
        EXPORT_NAME();
        EXPORT_VERSION();
-               
+
        return Layer_Composite::get_param(param);
 }
 
@@ -105,7 +106,7 @@ Layer_MotionBlur::get_color(Context context, const Point &pos)const
                Time time(time_cur);
                time+=(Vector::value_type)( (signed)(RAND_MAX/2)-(signed)rand() )/(Vector::value_type)(RAND_MAX) *aperture -aperture*0.5;
                context.set_time(time, pos);
-       }       
+       }
 */
        return context.get_color(pos);
 }
@@ -115,12 +116,12 @@ Layer_MotionBlur::get_param_vocab()const
 {
        Layer::Vocab ret;
        //ret=Layer_Composite::get_param_vocab();
-       
+
        ret.push_back(ParamDesc("aperture")
-               .set_local_name(_("Aperature"))
+               .set_local_name(_("Aperture"))
                .set_description(_("Shutter Time"))
        );
-       
+
        return ret;
 }
 
@@ -162,18 +163,18 @@ Layer_MotionBlur::accelerated_render(Context context,Surface *surface,int qualit
                                samples=3;
                                break;
                        case 10: // Rough Quality
-            default:                   
+            default:
                                samples=1;
                                break;
-                               
+
                }
-       
+
                Surface tmp;
                int i;
 
                surface->set_wh(renddesc.get_w(),renddesc.get_h());
                surface->clear();
-               
+
                for(i=0;i<samples;i++)
                {
                        subimagecb=SuperCallback(cb,i*(5000/samples),(i+1)*(5000/samples),5000);
@@ -190,6 +191,6 @@ Layer_MotionBlur::accelerated_render(Context context,Surface *surface,int qualit
        }
        else
                return context.accelerated_render(surface,quality,renddesc,cb);
-       
+
        return true;
 }