X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fmodules%2Fmod_particle%2Fplant.cpp;h=ef610c519c086ab4b1404e91e64b7b364d2a541a;hb=b5318fd86e61cb9065346a5b959809636ffe5dce;hp=68f71414c339da0c0d5b94d38070359c378ca2d5;hpb=402d759e7fc6b6d5200dd32ba4fab083af228f91;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 68f7141..ef610c5 100644 --- a/synfig-core/trunk/src/modules/mod_particle/plant.cpp +++ b/synfig-core/trunk/src/modules/mod_particle/plant.cpp @@ -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);