-/*! ========================================================================
-** Synfig
-** Template File
-** $Id: translate.cpp,v 1.2 2005/01/24 03:08:17 darco Exp $
+/* === S Y N F I G ========================================================= */
+/*! \file translate.cpp
+** \brief Implementation of the "Translate" layer
**
+** $Id$
+**
+** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
**
** This package is free software; you can redistribute it and/or
** 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
**
** === N O T E S ===========================================================
**
SYNFIG_LAYER_INIT(Translate);
SYNFIG_LAYER_SET_NAME(Translate,"translate");
-SYNFIG_LAYER_SET_LOCAL_NAME(Translate,_("Translate"));
-SYNFIG_LAYER_SET_CATEGORY(Translate,_("Transform"));
+SYNFIG_LAYER_SET_LOCAL_NAME(Translate,N_("Translate"));
+SYNFIG_LAYER_SET_CATEGORY(Translate,N_("Transform"));
SYNFIG_LAYER_SET_VERSION(Translate,"0.1");
-SYNFIG_LAYER_SET_CVS_ID(Translate,"$Id: translate.cpp,v 1.2 2005/01/24 03:08:17 darco Exp $");
+SYNFIG_LAYER_SET_CVS_ID(Translate,"$Id$");
/* === P R O C E D U R E S ================================================= */
Translate::~Translate()
{
}
-
+
bool
Translate::set_param(const String & param, const ValueBase &value)
{
IMPORT(origin);
-
+
return false;
}
EXPORT(origin);
EXPORT_NAME();
EXPORT_VERSION();
-
- return ValueBase();
+
+ return ValueBase();
}
Layer::Vocab
Translate::get_param_vocab()const
{
Layer::Vocab ret;
-
+
ret.push_back(ParamDesc("origin")
.set_local_name(_("Origin"))
.set_description(_("Point where you want the origin to be"))
);
-
+
return ret;
}
etl::handle<const Translate> layer;
public:
Translate_Trans(const Translate* x):Transform(x->get_guid()),layer(x) { }
-
+
synfig::Vector perform(const synfig::Vector& x)const
{
return x+layer->origin;
}
-
+
synfig::Vector unperform(const synfig::Vector& x)const
{
return x-layer->origin;