X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fmodules%2Flyr_std%2Ftwirl.cpp;fp=synfig-core%2Ftrunk%2Fsrc%2Fmodules%2Flyr_std%2Ftwirl.cpp;h=2a29b0f63de72cf5d86cb6856708fe3eb96a0e8c;hb=5ddcf36f04cfbd10fabda4e3c5633cb27cdd4c0a;hp=9ea1e6a0dbdbd5137b8ffda42e1ae3ec4d973abf;hpb=cee5940bae97612105db8b7e1ffcf513f9d9150c;p=synfig.git diff --git a/synfig-core/trunk/src/modules/lyr_std/twirl.cpp b/synfig-core/trunk/src/modules/lyr_std/twirl.cpp index 9ea1e6a..2a29b0f 100644 --- a/synfig-core/trunk/src/modules/lyr_std/twirl.cpp +++ b/synfig-core/trunk/src/modules/lyr_std/twirl.cpp @@ -72,7 +72,7 @@ Twirl::Twirl(): distort_outside(false) { } - + bool Twirl::set_param(const String & param, const ValueBase &value) { @@ -81,7 +81,7 @@ Twirl::set_param(const String & param, const ValueBase &value) IMPORT(rotations); IMPORT(distort_inside); IMPORT(distort_outside); - + return Layer_Composite::set_param(param,value); } @@ -93,10 +93,10 @@ Twirl::get_param(const String ¶m)const EXPORT(rotations); EXPORT(distort_inside); EXPORT(distort_outside); - + EXPORT_NAME(); EXPORT_VERSION(); - + return false; } @@ -104,11 +104,11 @@ Layer::Vocab Twirl::get_param_vocab()const { Layer::Vocab ret; - + ret.push_back(ParamDesc("center") .set_local_name(_("Center")) ); - + ret.push_back(ParamDesc("radius") .set_local_name(_("Radius")) .set_description(_("This is the radius of the circle")) @@ -137,18 +137,18 @@ Twirl::distort(const synfig::Point &pos,bool reverse)const { Point centered(pos-center); Real mag(centered.mag()); - + Angle a; if((distort_inside || mag>radius) && (distort_outside || mag 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 unperform(const synfig::Vector& x)const { return layer->distort(x,false); @@ -209,7 +209,7 @@ Twirl::accelerated_render(Context context,Surface *surface,int quality, const Re return true; } - + int x,y; Surface::pen pen(surface->begin()); @@ -218,7 +218,7 @@ Twirl::accelerated_render(Context context,Surface *surface,int quality, const Re 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