From 05d4adfae45eec173ff38a05c60b0ca289332aad Mon Sep 17 00:00:00 2001 From: Star Brilliant Date: Sun, 8 Jun 2014 20:59:22 +0800 Subject: [PATCH] Experimental 3D rotation handling --- danmaku2ass.py | 1 + 1 file changed, 1 insertion(+) diff --git a/danmaku2ass.py b/danmaku2ass.py index 316ca46..fe9f043 100755 --- a/danmaku2ass.py +++ b/danmaku2ass.py @@ -534,6 +534,7 @@ def ConvertFlashRotation(rotY, rotZ, X, Y, width, height): FOV = width*math.tan(2*math.pi/9.0)/2 scaleXY = FOV/(FOV+trZ) if scaleXY < 0: + scaleXY = 1 logging.error('Clipped rotation: trZ == %.0f < %.0f' % (trZ, FOV)); trX = (trX-width/2)*scaleXY+width/2 trY = (trY-height/2)*scaleXY+height/2