X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fmodules%2Flyr_std%2Fstretch.cpp;h=c8b509020d6dc37b3293c4d795c908fe210a7861;hb=fa569546257fc9ef11a6774f514d5abe9cf09542;hp=a6f4deff94fc7e6ee88b75342bb4b9c0dc628de3;hpb=7b4762d8b568f70e9b1a8d18afe0998af661d906;p=synfig.git 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