X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fmodules%2Fmod_particle%2Fplant.cpp;h=ef610c519c086ab4b1404e91e64b7b364d2a541a;hb=4b1229cdc21da8fe0bc6cbec315ddfb5b339ea54;hp=67f60b4d95f86fd1694207b1e3da0af7a89b4282;hpb=ff59c2a6989602a7bf82a7531836a7ecec5518c4;p=synfig.git diff --git a/synfig-core/trunk/src/modules/mod_particle/plant.cpp b/synfig-core/trunk/src/modules/mod_particle/plant.cpp index 67f60b4..ef610c5 100644 --- a/synfig-core/trunk/src/modules/mod_particle/plant.cpp +++ b/synfig-core/trunk/src/modules/mod_particle/plant.cpp @@ -78,7 +78,7 @@ Plant::Plant(): split_angle(Angle::deg(10)), gravity(0,-0.1), velocity(0.3), - perp_velocity(0.3), + perp_velocity(0.0), step(0.01), sprouts(10) { @@ -443,6 +443,7 @@ Plant::accelerated_render(Context context,Surface *surface,int quality, const Re sync(); std::vector::reverse_iterator iter; + float radius(size*sqrt(1.0f/(abs(pw)*abs(ph)))); int x1,y1,x2,y2; @@ -456,6 +457,11 @@ Plant::accelerated_render(Context context,Surface *surface,int quality, const Re color.set_a(1); } + // previously, radius was multiplied by sqrt(step)*12 only if + // the radius came out at less than 1 (pixel): + // if (radius<=1.0f) radius*=sqrt(step)*12.0f; + // seems a little arbitrary - does it help? + // calculate the box that this particle will be drawn as float x1f=(iter->point[0]-tl[0])/pw-(scaled_radius*0.5); float x2f=(iter->point[0]-tl[0])/pw+(scaled_radius*0.5);