Remove .gitignore do nothing is ignored.
[synfig.git] / synfig-core / trunk / src / modules / mod_geometry / circle.cpp
index 8df1e78..f5ad99b 100644 (file)
@@ -306,7 +306,7 @@ Circle::FALLOFF_FUNC *Circle::GetFalloffFunc()const
 Color
 Circle::get_color(Context context, const Point &point)const
 {
-       if(radius==0 || is_disabled())
+       if(is_disabled() || (radius==0 && invert==false && !feather))
                return context.get_color(point);
 
 
@@ -344,7 +344,7 @@ Circle::get_color(Context context, const Point &point)const
                                return Color::blend(color,context.get_color(point),get_amount(),get_blend_method());
                }
                else
-                       return context.get_color(point);
+                       return Color::blend(Color::alpha(),context.get_color(point),get_amount(),get_blend_method());
        }
 
        //inside the circle's solid area (with feathering)
@@ -357,7 +357,7 @@ Circle::get_color(Context context, const Point &point)const
                        else
                                return Color::blend(color,context.get_color(point),get_amount(),get_blend_method());
                else
-                       return context.get_color(point);
+                       return Color::blend(Color::alpha(),context.get_color(point),get_amount(),get_blend_method());
        }
 
        //If we get here, the pixel is within the feathering area, and is thus subject to falloff
@@ -401,10 +401,7 @@ Circle::get_color(Context context, const Point &point)const
 
                alpha = falloff_func(cache,mag_squared);
 
-               //Compose falloff value with amount from the composite layer, and that is the blend value
-               alpha *= get_amount();
-
-               return Color::blend(color,context.get_color(point),alpha,get_blend_method());
+               return Color::blend(color*alpha,context.get_color(point),get_amount(),get_blend_method());
        }
 }
 
@@ -418,7 +415,7 @@ bool
 Circle::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const
 {
        // trivial case
-       if(is_disabled() || (radius==0 && invert==false))
+       if(is_disabled() || (radius==0 && invert==false && !feather))
                return context.accelerated_render(surface,quality, renddesc, cb);
 
        // Another trivial case