X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Flayer_motionblur.cpp;h=5ae8a8f7fc3f07a79fbd959277fd1dbd5890df7f;hb=63e709f66d50c124cc0ece2325f4773ac4ae7b20;hp=e60cdee1c06ab31f2fab95790ffc532e2fb51c9d;hpb=dd77396ef0832460e05b4ce99a5e9f552424d9e2;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/layer_motionblur.cpp b/synfig-core/trunk/src/synfig/layer_motionblur.cpp index e60cdee..5ae8a8f 100644 --- a/synfig-core/trunk/src/synfig/layer_motionblur.cpp +++ b/synfig-core/trunk/src/synfig/layer_motionblur.cpp @@ -1,11 +1,12 @@ /* === S Y N F I G ========================================================= */ /*! \file layer_motionblur.cpp -** \brief Template Header +** \brief Implementation of the "Motion Blur" layer ** ** $Id$ ** ** \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,9 +52,9 @@ using namespace std; /* === G L O B A L S ======================================================= */ SYNFIG_LAYER_INIT(Layer_MotionBlur); -SYNFIG_LAYER_SET_NAME(Layer_MotionBlur,"motion_blur"); -SYNFIG_LAYER_SET_LOCAL_NAME(Layer_MotionBlur,_("Motion Blur")); -SYNFIG_LAYER_SET_CATEGORY(Layer_MotionBlur,_("Blurs")); +SYNFIG_LAYER_SET_NAME(Layer_MotionBlur,"MotionBlur"); // todo: use motion_blur +SYNFIG_LAYER_SET_LOCAL_NAME(Layer_MotionBlur,N_("Motion Blur")); +SYNFIG_LAYER_SET_CATEGORY(Layer_MotionBlur,N_("Blurs")); SYNFIG_LAYER_SET_VERSION(Layer_MotionBlur,"0.1"); SYNFIG_LAYER_SET_CVS_ID(Layer_MotionBlur,"$Id$"); @@ -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; @@ -160,7 +161,7 @@ Layer_MotionBlur::accelerated_render(Context context,Surface *surface,int qualit samples=3; break; case 9: - samples=3; + samples=2; break; case 10: // Rough Quality default: @@ -169,8 +170,11 @@ Layer_MotionBlur::accelerated_render(Context context,Surface *surface,int qualit } + 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