X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Flayer_motionblur.cpp;h=bf1a261a8d63b8a29f48d3bef6f6789e88aaece4;hb=f3b39e2e128f666292ae448740900748e3fe19a2;hp=2e720882f7d2e91ed743a211e448558b0b1d483d;hpb=70bcefce2ab011a11014f36fc129b473cc0bc61e;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/layer_motionblur.cpp b/synfig-core/trunk/src/synfig/layer_motionblur.cpp index 2e72088..bf1a261 100644 --- a/synfig-core/trunk/src/synfig/layer_motionblur.cpp +++ b/synfig-core/trunk/src/synfig/layer_motionblur.cpp @@ -2,7 +2,7 @@ /*! \file layer_motionblur.cpp ** \brief Template Header ** -** $Id: layer_motionblur.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $ +** $Id$ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley @@ -51,11 +51,11 @@ 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"); -SYNFIG_LAYER_SET_CVS_ID(Layer_MotionBlur,"$Id: layer_motionblur.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $"); +SYNFIG_LAYER_SET_CVS_ID(Layer_MotionBlur,"$Id$"); /* === M E M B E R S ======================================================= */ @@ -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