X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fmodules%2Fmod_geometry%2Fcircle.cpp;h=f5ad99b82c52363a28325fd5ad70c27b9e86c75c;hb=9459638ad6797b8139f1e9f0715c96076dbf0890;hp=8df1e7892fcc397f8e7625e1f364b61d32937b99;hpb=4a6b5f2e444558761c4e8afccaa61fb2c58ec593;p=synfig.git diff --git a/synfig-core/trunk/src/modules/mod_geometry/circle.cpp b/synfig-core/trunk/src/modules/mod_geometry/circle.cpp index 8df1e78..f5ad99b 100644 --- a/synfig-core/trunk/src/modules/mod_geometry/circle.cpp +++ b/synfig-core/trunk/src/modules/mod_geometry/circle.cpp @@ -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