SYNFIG_LAYER_INIT(Twirl);
SYNFIG_LAYER_SET_NAME(Twirl,"twirl");
SYNFIG_LAYER_INIT(Twirl);
SYNFIG_LAYER_SET_NAME(Twirl,"twirl");
-SYNFIG_LAYER_SET_LOCAL_NAME(Twirl,_("Twirl"));
-SYNFIG_LAYER_SET_CATEGORY(Twirl,_("Distortions"));
+SYNFIG_LAYER_SET_LOCAL_NAME(Twirl,N_("Twirl"));
+SYNFIG_LAYER_SET_CATEGORY(Twirl,N_("Distortions"));
ret.push_back(ParamDesc("radius")
.set_local_name(_("Radius"))
.set_description(_("This is the radius of the circle"))
ret.push_back(ParamDesc("radius")
.set_local_name(_("Radius"))
.set_description(_("This is the radius of the circle"))
Angle a;
if((distort_inside || mag>radius) && (distort_outside || mag<radius))
a=rotations*((centered.mag()-radius)/radius);
else
return pos;
Angle a;
if((distort_inside || mag>radius) && (distort_outside || mag<radius))
a=rotations*((centered.mag()-radius)/radius);
else
return pos;
etl::handle<const Twirl> layer;
public:
Twirl_Trans(const Twirl* x):Transform(x->get_guid()),layer(x) { }
etl::handle<const Twirl> layer;
public:
Twirl_Trans(const Twirl* x):Transform(x->get_guid()),layer(x) { }
synfig::Vector perform(const synfig::Vector& x)const
{
return layer->distort(x,true);
}
synfig::Vector perform(const synfig::Vector& x)const
{
return layer->distort(x,true);
}
synfig::Vector unperform(const synfig::Vector& x)const
{
return layer->distort(x,false);
synfig::Vector unperform(const synfig::Vector& x)const
{
return layer->distort(x,false);
Point tl(renddesc.get_tl());
const int w(surface->get_w());
const int h(surface->get_h());
Point tl(renddesc.get_tl());
const int w(surface->get_w());
const int h(surface->get_h());
if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT)
{
for(y=0,pos[1]=tl[1];y<h;y++,pen.inc_y(),pen.dec_x(x),pos[1]+=ph)
if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT)
{
for(y=0,pos[1]=tl[1];y<h;y++,pen.inc_y(),pen.dec_x(x),pos[1]+=ph)