diff options
-rw-r--r-- | src/library_sdl.js | 2 | ||||
-rw-r--r-- | tests/sdl_rotozoom.c | 2 | ||||
-rw-r--r-- | tests/sdl_rotozoom.png | bin | 431168 -> 711242 bytes | |||
-rw-r--r-- | tests/test_browser.py | 2 |
4 files changed, 3 insertions, 3 deletions
diff --git a/src/library_sdl.js b/src/library_sdl.js index 27f2c0da..e64f117f 100644 --- a/src/library_sdl.js +++ b/src/library_sdl.js @@ -1122,7 +1122,7 @@ var LibrarySDL = { var ret = SDL.makeSurface(diagonal, diagonal, srcData.flags, false, 'rotozoomSurface'); var dstData = SDL.surfaces[ret]; dstData.ctx.translate(diagonal / 2, diagonal / 2); - dstData.ctx.rotate(angle * Math.PI / 180); + dstData.ctx.rotate(-angle * Math.PI / 180); dstData.ctx.drawImage(srcData.canvas, -w / 2, -h / 2, w, h); return ret; }, diff --git a/tests/sdl_rotozoom.c b/tests/sdl_rotozoom.c index cdbdcc6f..2c0d35df 100644 --- a/tests/sdl_rotozoom.c +++ b/tests/sdl_rotozoom.c @@ -38,7 +38,7 @@ int main(int argc, char **argv) { sprite[2] = zoomSurface(sprite[0], 0.5, 0.5, SMOOTHING_ON); sprite[3] = zoomSurface(sprite[1], 0.5, 0.5, SMOOTHING_ON); sprite[4] = rotozoomSurface(sprite[0], -20, 0.3, SMOOTHING_ON); - sprite[5] = rotozoomSurface(sprite[1], 45, 0.5, SMOOTHING_ON); + sprite[5] = rotozoomSurface(sprite[1], 20, 1, SMOOTHING_ON); sprite[6] = zoomSurface(sprite[0], -0.5, 0.5, SMOOTHING_ON); sprite[7] = zoomSurface(sprite[0], -0.5, -0.5, SMOOTHING_ON); sprite[8] = rotozoomSurface(sprite[1], 0, 0.5, SMOOTHING_ON); diff --git a/tests/sdl_rotozoom.png b/tests/sdl_rotozoom.png Binary files differindex 5933754f..ebde79f2 100644 --- a/tests/sdl_rotozoom.png +++ b/tests/sdl_rotozoom.png diff --git a/tests/test_browser.py b/tests/test_browser.py index 24113511..1eba2ef5 100644 --- a/tests/test_browser.py +++ b/tests/test_browser.py @@ -1389,7 +1389,7 @@ keydown(100);keyup(100); // trigger the end def test_sdl_rotozoom(self): shutil.copyfile(path_from_root('tests', 'screenshot.png'), os.path.join(self.get_dir(), 'screenshot.png')) - self.btest('sdl_rotozoom.c', reference='sdl_rotozoom.png', args=['--preload-file', 'screenshot.png'], reference_slack=5) + self.btest('sdl_rotozoom.c', reference='sdl_rotozoom.png', args=['--preload-file', 'screenshot.png']) def test_sdl_gfx_primitives(self): self.btest('sdl_gfx_primitives.c', reference='sdl_gfx_primitives.png', reference_slack=1) |