From 2bb65327eb322d6e2dd90c5cb0e7ff1e9cb6202d Mon Sep 17 00:00:00 2001 From: dooglus Date: Mon, 10 Sep 2007 01:38:21 +0000 Subject: [PATCH] Added a comment about the strange fudge factor in the previous versions of the plant layer code. git-svn-id: http://svn.voria.com/code@649 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/src/modules/mod_particle/plant.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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); -- 2.7.4