X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Flayer_motionblur.cpp;h=b02ba72a08e13adf871e8c707cda943a724136f9;hb=99b75ef1bb279e2314516f922f05696263d5bd27;hp=977f4bdb7ae803b4c02ca2d792fa55038b125175;hpb=cc54c38609ee9745ad678e5e9b9d7d2912be9c95;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/layer_motionblur.cpp b/synfig-core/trunk/src/synfig/layer_motionblur.cpp index 977f4bd..b02ba72 100644 --- a/synfig-core/trunk/src/synfig/layer_motionblur.cpp +++ b/synfig-core/trunk/src/synfig/layer_motionblur.cpp @@ -6,6 +6,7 @@ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -51,7 +52,7 @@ using namespace std; /* === G L O B A L S ======================================================= */ SYNFIG_LAYER_INIT(Layer_MotionBlur); -SYNFIG_LAYER_SET_NAME(Layer_MotionBlur,"MotionBlur"); +SYNFIG_LAYER_SET_NAME(Layer_MotionBlur,"MotionBlur"); // todo: use motion_blur SYNFIG_LAYER_SET_LOCAL_NAME(Layer_MotionBlur,_("Motion Blur")); SYNFIG_LAYER_SET_CATEGORY(Layer_MotionBlur,_("Blurs")); SYNFIG_LAYER_SET_VERSION(Layer_MotionBlur,"0.1"); @@ -128,7 +129,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 +165,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 +182,18 @@ Layer_MotionBlur::accelerated_render(Context context,Surface *surface,int qualit for(i=0;i