Rectangles are 'solid color' when using straight blending if both the amount and...
[synfig.git] / synfig-core / trunk / src / modules / mod_geometry / rectangle.cpp
index d5b861c..799a0f6 100644 (file)
@@ -177,6 +177,15 @@ Rectangle::hit_check(synfig::Context context, const synfig::Point &pos)const
        return context.hit_check(pos);
 }
 
+bool
+Rectangle::is_solid_color()const
+{
+       return Layer_Composite::is_solid_color() ||
+               (get_blend_method() == Color::BLEND_COMPOSITE &&
+                get_amount() == 1.0f &&
+                color.get_a() == 1.0f);
+}
+
 Color
 Rectangle::get_color(Context context, const Point &pos)const
 {