Fix the 'plant' layer.
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Fri, 7 Sep 2007 19:10:48 +0000 (19:10 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Fri, 7 Sep 2007 19:10:48 +0000 (19:10 +0000)
git-svn-id: http://svn.voria.com/code@620 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-core/trunk/src/modules/mod_particle/plant.cpp

index 1d987f6..66d78b8 100644 (file)
@@ -413,7 +413,7 @@ Plant::accelerated_render(Context context,Surface *surface,int quality, const Re
 
        std::vector<Particle>::reverse_iterator iter;
        const float size_factor(1);
-       float radius(size_factor*size*sqrt(1.0f/(abs(pw)*abs(ph))));
+       float radius(size_factor*size*sqrt(1.0f/(abs(pw)*abs(ph)))), temp_radius;
 
        if(radius>1.0f)
        {
@@ -421,7 +421,8 @@ Plant::accelerated_render(Context context,Surface *surface,int quality, const Re
                int x1,y1,x2,y2;
                for(iter=particle_list.rbegin();iter!=particle_list.rend();++iter)
                {
-                       float radius(radius);
+                       temp_radius = radius;
+                       float radius(temp_radius);
                        Color color(iter->color);
                        if(size_as_alpha)
                        {
@@ -469,7 +470,8 @@ Plant::accelerated_render(Context context,Surface *surface,int quality, const Re
                float a,b,c,d;
                for(iter=particle_list.rbegin();iter!=particle_list.rend();++iter)
                {
-                       float radius(radius);
+                       temp_radius = radius;
+                       float radius(temp_radius);
                        Color color(iter->color);
                        if(size_as_alpha)
                        {