projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixing user name...
[synfig.git]
/
synfig-core
/
trunk
/
src
/
modules
/
lyr_std
/
xorpattern.cpp
diff --git
a/synfig-core/trunk/src/modules/lyr_std/xorpattern.cpp
b/synfig-core/trunk/src/modules/lyr_std/xorpattern.cpp
index
9e74ead
..
df7c6bd
100644
(file)
--- a/
synfig-core/trunk/src/modules/lyr_std/xorpattern.cpp
+++ b/
synfig-core/trunk/src/modules/lyr_std/xorpattern.cpp
@@
-1,11
+1,12
@@
/* === S Y N F I G ========================================================= */
/*! \file xorpattern.cpp
/* === S Y N F I G ========================================================= */
/*! \file xorpattern.cpp
-** \brief
Template Head
er
+** \brief
Implementation of the "XOR Pattern" lay
er
**
** $Id$
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
**
** $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
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
@@
-50,8
+51,8
@@
SYNFIG_LAYER_INIT(XORPattern);
SYNFIG_LAYER_SET_NAME(XORPattern,"xor_pattern");
SYNFIG_LAYER_INIT(XORPattern);
SYNFIG_LAYER_SET_NAME(XORPattern,"xor_pattern");
-SYNFIG_LAYER_SET_LOCAL_NAME(XORPattern,_("XOR Pattern"));
-SYNFIG_LAYER_SET_CATEGORY(XORPattern,_("Other"));
+SYNFIG_LAYER_SET_LOCAL_NAME(XORPattern,
N
_("XOR Pattern"));
+SYNFIG_LAYER_SET_CATEGORY(XORPattern,
N
_("Other"));
SYNFIG_LAYER_SET_VERSION(XORPattern,"0.1");
SYNFIG_LAYER_SET_CVS_ID(XORPattern,"$Id$");
SYNFIG_LAYER_SET_VERSION(XORPattern,"0.1");
SYNFIG_LAYER_SET_CVS_ID(XORPattern,"$Id$");
@@
-61,7
+62,7
@@
SYNFIG_LAYER_SET_CVS_ID(XORPattern,"$Id$");
XORPattern::XORPattern():
Layer_Composite (1.0,Color::BLEND_STRAIGHT),
XORPattern::XORPattern():
Layer_Composite (1.0,Color::BLEND_STRAIGHT),
-
pos
(0.125,0.125),
+
origin
(0.125,0.125),
size(0.25,0.25)
{
}
size(0.25,0.25)
{
}
@@
-69,16
+70,18
@@
XORPattern::XORPattern():
bool
XORPattern::set_param(const String & param, const ValueBase &value)
{
bool
XORPattern::set_param(const String & param, const ValueBase &value)
{
- IMPORT(
pos
);
+ IMPORT(
origin
);
IMPORT(size);
IMPORT(size);
+ IMPORT_AS(origin,"pos");
+
return Layer_Composite::set_param(param,value);
}
ValueBase
XORPattern::get_param(const String & param)const
{
return Layer_Composite::set_param(param,value);
}
ValueBase
XORPattern::get_param(const String & param)const
{
- EXPORT(
pos
);
+ EXPORT(
origin
);
EXPORT(size);
EXPORT_NAME();
EXPORT(size);
EXPORT_NAME();
@@
-93,7
+96,7
@@
XORPattern::get_color(Context context, const Point &point)const
if(get_amount()==0.0)
return context.get_color(point);
if(get_amount()==0.0)
return context.get_color(point);
- unsigned int a=(unsigned int)floor((point[0]-
pos[0])/size[0]), b=(unsigned int)floor((point[1]-pos
[1])/size[1]);
+ unsigned int a=(unsigned int)floor((point[0]-
origin[0])/size[0]), b=(unsigned int)floor((point[1]-origin
[1])/size[1]);
unsigned char rindex=(a^b);
unsigned char gindex=(a^(~b))*4;
unsigned char bindex=~(a^b)*2;
unsigned char rindex=(a^b);
unsigned char gindex=(a^(~b))*4;
unsigned char bindex=~(a^b)*2;
@@
-115,12
+118,12
@@
XORPattern::get_param_vocab()const
{
Layer::Vocab ret(Layer_Composite::get_param_vocab());
{
Layer::Vocab ret(Layer_Composite::get_param_vocab());
- ret.push_back(ParamDesc("
pos
")
- .set_local_name(_("O
ffset
"))
+ ret.push_back(ParamDesc("
origin
")
+ .set_local_name(_("O
rigin
"))
);
ret.push_back(ParamDesc("size")
.set_local_name(_("Size"))
);
ret.push_back(ParamDesc("size")
.set_local_name(_("Size"))
- .set_origin("
pos
")
+ .set_origin("
origin
")
);
return ret;
);
return ret;