Fix 1823082: don't render layers under a 'stretch' layer with zero x or y amount.
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Wed, 31 Oct 2007 09:34:50 +0000 (09:34 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Wed, 31 Oct 2007 09:34:50 +0000 (09:34 +0000)
git-svn-id: http://svn.voria.com/code@1090 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-core/trunk/src/modules/lyr_std/stretch.cpp

index a6f4def..c8b5090 100644 (file)
@@ -155,6 +155,13 @@ Layer_Stretch::get_transform()const
 bool
 Layer_Stretch::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const
 {
+       if (amount[0] == 0 || amount[1] == 0)
+       {
+               surface->set_wh(renddesc.get_w(), renddesc.get_h());
+               surface->clear();
+               return true;
+       }
+
        RendDesc desc(renddesc);
        desc.clear_flags();
     // Adjust the top_left and bottom_right points