From 23ec46b19496a4a03eae24507b13a1719fa6e426 Mon Sep 17 00:00:00 2001 From: dooglus Date: Mon, 10 Sep 2007 16:54:18 +0000 Subject: [PATCH] Show basic motion blur even in the workarea display; ie. show the current frame and the (time-aperture) frame only. Don't use any future frames to generate the blur, only past frames. Make older frames contribute less to the blur than newer frames - ie. the blur decays linearly, rather than not decaying at all. git-svn-id: http://svn.voria.com/code@650 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/src/synfig/layer_motionblur.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/synfig-core/trunk/src/synfig/layer_motionblur.cpp b/synfig-core/trunk/src/synfig/layer_motionblur.cpp index e60cdee..6230de9 100644 --- a/synfig-core/trunk/src/synfig/layer_motionblur.cpp +++ b/synfig-core/trunk/src/synfig/layer_motionblur.cpp @@ -128,7 +128,7 @@ Layer_MotionBlur::get_param_vocab()const bool Layer_MotionBlur::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const { - if(aperture && quality<10) + if(aperture && quality<=10) { //int x, y; SuperCallback subimagecb; @@ -164,13 +164,16 @@ Layer_MotionBlur::accelerated_render(Context context,Surface *surface,int qualit break; case 10: // Rough Quality default: - samples=1; + samples=2; break; } + if (samples == 1) return context.accelerated_render(surface,quality,renddesc,cb); + Surface tmp; int i; + float scale, divisor = 0; surface->set_wh(renddesc.get_w(),renddesc.get_h()); surface->clear(); @@ -178,16 +181,18 @@ Layer_MotionBlur::accelerated_render(Context context,Surface *surface,int qualit for(i=0;i