From fa569546257fc9ef11a6774f514d5abe9cf09542 Mon Sep 17 00:00:00 2001 From: dooglus Date: Wed, 31 Oct 2007 09:34:50 +0000 Subject: [PATCH] Fix 1823082: don't render layers under a 'stretch' layer with zero x or y amount. git-svn-id: http://svn.voria.com/code@1090 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/src/modules/lyr_std/stretch.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/synfig-core/trunk/src/modules/lyr_std/stretch.cpp b/synfig-core/trunk/src/modules/lyr_std/stretch.cpp index a6f4def..c8b5090 100644 --- a/synfig-core/trunk/src/modules/lyr_std/stretch.cpp +++ b/synfig-core/trunk/src/modules/lyr_std/stretch.cpp @@ -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 -- 2.7.4