From 599d986575166d1a19d123c80e63ec5db80010f9 Mon Sep 17 00:00:00 2001 From: dooglus Date: Sat, 11 Oct 2008 07:00:30 +0000 Subject: [PATCH] Fix 2152666: Animation of Rotate Layer produces jitter. git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2093 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/src/modules/lyr_std/rotate.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/synfig-core/trunk/src/modules/lyr_std/rotate.cpp b/synfig-core/trunk/src/modules/lyr_std/rotate.cpp index 39dcbf4..fd13f92 100644 --- a/synfig-core/trunk/src/modules/lyr_std/rotate.cpp +++ b/synfig-core/trunk/src/modules/lyr_std/rotate.cpp @@ -228,6 +228,11 @@ Rotate::accelerated_render(Context context,Surface *surface,int quality, const R Real pw=(renddesc.get_w())/(renddesc.get_br()[0]-renddesc.get_tl()[0]); Real ph=(renddesc.get_h())/(renddesc.get_br()[1]-renddesc.get_tl()[1]); + // we're going to round the canvas size to an integer number of pixels, so round the + // tl-br rectangle accordingly - otherwise we see the jittering described in bug 2152666 + br[0] -= (pw*(br[0]-tl[0]) - round_to_int(pw*(br[0]-tl[0]))) / pw; + br[1] -= (ph*(br[1]-tl[1]) - round_to_int(ph*(br[1]-tl[1]))) / ph; + RendDesc desc(renddesc); desc.clear_flags(); //desc.set_flags(RendDesc::PX_ASPECT); -- 2.7.4