X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fmodules%2Flyr_std%2Ftranslate.cpp;h=f430eeeeb46363ea3fd8110f5bc655d2ae9c8a1e;hb=5ddcf36f04cfbd10fabda4e3c5633cb27cdd4c0a;hp=63ec3a228514019642931915fe96008f6987e432;hpb=16b3beced25134bef064705568ecb893a6be4e79;p=synfig.git diff --git a/synfig-core/trunk/src/modules/lyr_std/translate.cpp b/synfig-core/trunk/src/modules/lyr_std/translate.cpp index 63ec3a2..f430eee 100644 --- a/synfig-core/trunk/src/modules/lyr_std/translate.cpp +++ b/synfig-core/trunk/src/modules/lyr_std/translate.cpp @@ -1,18 +1,19 @@ /*! ======================================================================== -** Sinfg +** Synfig ** Template File ** $Id: translate.cpp,v 1.2 2005/01/24 03:08:17 darco Exp $ ** -** 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. ** ** === N O T E S =========================================================== ** @@ -28,16 +29,16 @@ #endif #include "translate.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif @@ -45,12 +46,12 @@ /* === G L O B A L S ======================================================= */ -SINFG_LAYER_INIT(Translate); -SINFG_LAYER_SET_NAME(Translate,"translate"); -SINFG_LAYER_SET_LOCAL_NAME(Translate,_("Translate")); -SINFG_LAYER_SET_CATEGORY(Translate,_("Transform")); -SINFG_LAYER_SET_VERSION(Translate,"0.1"); -SINFG_LAYER_SET_CVS_ID(Translate,"$Id: translate.cpp,v 1.2 2005/01/24 03:08:17 darco Exp $"); +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_VERSION(Translate,"0.1"); +SYNFIG_LAYER_SET_CVS_ID(Translate,"$Id: translate.cpp,v 1.2 2005/01/24 03:08:17 darco Exp $"); /* === P R O C E D U R E S ================================================= */ @@ -65,12 +66,12 @@ Translate::Translate():origin(0,0) Translate::~Translate() { } - + bool Translate::set_param(const String & param, const ValueBase &value) { IMPORT(origin); - + return false; } @@ -80,25 +81,25 @@ Translate::get_param(const String& param)const 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; } -sinfg::Layer::Handle -Translate::hit_check(sinfg::Context context, const sinfg::Point &pos)const +synfig::Layer::Handle +Translate::hit_check(synfig::Context context, const synfig::Point &pos)const { return context.hit_check(pos-origin); } @@ -114,13 +115,13 @@ class Translate_Trans : public Transform etl::handle layer; public: Translate_Trans(const Translate* x):Transform(x->get_guid()),layer(x) { } - - sinfg::Vector perform(const sinfg::Vector& x)const + + synfig::Vector perform(const synfig::Vector& x)const { return x+layer->origin; } - - sinfg::Vector unperform(const sinfg::Vector& x)const + + synfig::Vector unperform(const synfig::Vector& x)const { return x-layer->origin; }