Solve rotate problem and re-add space line
This commit is contained in:
parent
49b338b1f9
commit
0aad472e48
@ -318,6 +318,7 @@ def WriteCommentBilibiliPositioned(f, c, width, height, styleid):
|
||||
except IndexError:
|
||||
logging.warning(_('Invalid comment: %r') % c)
|
||||
|
||||
|
||||
def WriteCommentAcfunPositioned(f, c, width, height, styleid):
|
||||
AcfunPlayerSize = (560, 400)
|
||||
ZoomFactor = GetZoomFactor(AcfunPlayerSize, (width, height))
|
||||
@ -445,11 +446,7 @@ def WriteCommentSH5VPositioned(f, c, width, height, styleid):
|
||||
styles.append('\\fs%s' % fsize)
|
||||
if rotate_y is not None and rotate_z is not None:
|
||||
styles.append('\\frz%s' % round(rotate_z))
|
||||
if not (-1 < rotate_z < 1):
|
||||
styles.append('\\frx%s' % round(rotate_y*math.sin(rotate_z*math.pi/180.0)))
|
||||
styles.append('\\fry%s' % round(rotate_y*math.cos(rotate_z*math.pi/180.0)))
|
||||
else:
|
||||
styles.append('\\fry%s' % round(rotate_y))
|
||||
styles.append('\\fry%s' % round(rotate_y))
|
||||
if color is not None:
|
||||
styles.append('\\c&H%02X%02X%02X&' % (color & 0xff, (color >> 8) & 0xff, (color >> 16) & 0xff))
|
||||
if color == 0x000000:
|
||||
@ -507,6 +504,7 @@ def GetZoomFactor(SourceSize, TargetSize):
|
||||
GetZoomFactor.Cached_Result = (1, 0, 0)
|
||||
return GetZoomFactor.Cached_Result
|
||||
|
||||
|
||||
def ProcessComments(comments, f, width, height, bottomReserved, fontface, fontsize, alpha, lifetime, reduced, progress_callback):
|
||||
styleid = 'Danmaku2ASS_%04x' % random.randint(0, 0xffff)
|
||||
WriteASSHead(f, width, height, fontface, fontsize, alpha, styleid)
|
||||
|
Binary file not shown.
@ -2,7 +2,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Danmaku2ASS\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2014-02-02 18:51+0800\n"
|
||||
"POT-Creation-Date: 2014-02-03 16:50+0800\n"
|
||||
"Last-Translator: Star Brilliant <m13253@hotmail.com>\n"
|
||||
"Language: en\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@ -15,92 +15,92 @@ msgid "Invalid comment: %s"
|
||||
msgstr "Invalid comment: %s"
|
||||
|
||||
#: danmaku2ass.py:158 danmaku2ass.py:192 danmaku2ass.py:235 danmaku2ass.py:317
|
||||
#: danmaku2ass.py:319 danmaku2ass.py:436 danmaku2ass.py:483 danmaku2ass.py:540
|
||||
#: danmaku2ass.py:319 danmaku2ass.py:437 danmaku2ass.py:480 danmaku2ass.py:538
|
||||
#, python-format
|
||||
msgid "Invalid comment: %r"
|
||||
msgstr "Invalid comment: %r"
|
||||
|
||||
#: danmaku2ass.py:690 danmaku2ass.py:738
|
||||
#: danmaku2ass.py:688 danmaku2ass.py:736
|
||||
msgid "(FONT) sans-serif"
|
||||
msgstr "(FONT) Helvetica"
|
||||
|
||||
#: danmaku2ass.py:719
|
||||
#: danmaku2ass.py:717
|
||||
#, python-format
|
||||
msgid "Unknown comment file format: %s"
|
||||
msgstr "Unknown comment file format: %s"
|
||||
|
||||
#: danmaku2ass.py:736
|
||||
#: danmaku2ass.py:734
|
||||
msgid "OUTPUT"
|
||||
msgstr "OUTPUT"
|
||||
|
||||
#: danmaku2ass.py:736
|
||||
#: danmaku2ass.py:734
|
||||
msgid "Output file"
|
||||
msgstr "Output file"
|
||||
|
||||
#: danmaku2ass.py:737
|
||||
#: danmaku2ass.py:735
|
||||
msgid "WIDTHxHEIGHT"
|
||||
msgstr "WIDTHxHEIGHT"
|
||||
|
||||
#: danmaku2ass.py:737
|
||||
#: danmaku2ass.py:735
|
||||
msgid "Stage size in pixels"
|
||||
msgstr "Stage size in pixels"
|
||||
|
||||
#: danmaku2ass.py:738
|
||||
#: danmaku2ass.py:736
|
||||
msgid "FONT"
|
||||
msgstr "FONT"
|
||||
|
||||
#: danmaku2ass.py:738
|
||||
#: danmaku2ass.py:736
|
||||
#, python-format
|
||||
msgid "Specify font face [default: %s]"
|
||||
msgstr "Specify font face [default: %s]"
|
||||
|
||||
#: danmaku2ass.py:739
|
||||
#: danmaku2ass.py:737
|
||||
msgid "SIZE"
|
||||
msgstr "SIZE"
|
||||
|
||||
#: danmaku2ass.py:739
|
||||
#: danmaku2ass.py:737
|
||||
#, python-format
|
||||
msgid "Default font size [default: %s]"
|
||||
msgstr "Default font size [default: %s]"
|
||||
|
||||
#: danmaku2ass.py:740
|
||||
#: danmaku2ass.py:738
|
||||
msgid "ALPHA"
|
||||
msgstr "ALPHA"
|
||||
|
||||
#: danmaku2ass.py:740
|
||||
#: danmaku2ass.py:738
|
||||
msgid "Text opaque"
|
||||
msgstr "Text opaque"
|
||||
|
||||
#: danmaku2ass.py:741
|
||||
#: danmaku2ass.py:739
|
||||
msgid "SECONDS"
|
||||
msgstr "SECONDS"
|
||||
|
||||
#: danmaku2ass.py:741
|
||||
#: danmaku2ass.py:739
|
||||
#, python-format
|
||||
msgid "Duration of comment display [default: %s]"
|
||||
msgstr "Duration of comment display [default: %s]"
|
||||
|
||||
#: danmaku2ass.py:742
|
||||
#: danmaku2ass.py:740
|
||||
msgid "HEIGHT"
|
||||
msgstr "HEIGHT"
|
||||
|
||||
#: danmaku2ass.py:742
|
||||
#: danmaku2ass.py:740
|
||||
msgid "Reserve blank on the bottom of the stage"
|
||||
msgstr "Reserve blank on the bottom of the stage"
|
||||
|
||||
#: danmaku2ass.py:743
|
||||
#: danmaku2ass.py:741
|
||||
msgid "Reduce the amount of comments if stage is full"
|
||||
msgstr "Reduce the amount of comments if stage is full"
|
||||
|
||||
#: danmaku2ass.py:744
|
||||
#: danmaku2ass.py:742
|
||||
msgid "FILE"
|
||||
msgstr "FILE"
|
||||
|
||||
#: danmaku2ass.py:744
|
||||
#: danmaku2ass.py:742
|
||||
msgid "Comment file to be processed"
|
||||
msgstr "Comment file to be processed"
|
||||
|
||||
#: danmaku2ass.py:751
|
||||
#: danmaku2ass.py:749
|
||||
#, python-format
|
||||
msgid "Invalid stage size: %r"
|
||||
msgstr "Invalid stage size: %r"
|
||||
|
Binary file not shown.
@ -2,7 +2,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Danmaku2ASS\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2014-02-02 18:51+0800\n"
|
||||
"POT-Creation-Date: 2014-02-03 16:50+0800\n"
|
||||
"Last-Translator: Star Brilliant <m13253@hotmail.com>\n"
|
||||
"Language: ja\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@ -15,92 +15,92 @@ msgid "Invalid comment: %s"
|
||||
msgstr "無効なコメント:%s"
|
||||
|
||||
#: danmaku2ass.py:158 danmaku2ass.py:192 danmaku2ass.py:235 danmaku2ass.py:317
|
||||
#: danmaku2ass.py:319 danmaku2ass.py:436 danmaku2ass.py:483 danmaku2ass.py:540
|
||||
#: danmaku2ass.py:319 danmaku2ass.py:437 danmaku2ass.py:480 danmaku2ass.py:538
|
||||
#, python-format
|
||||
msgid "Invalid comment: %r"
|
||||
msgstr "無効なコメント:%r"
|
||||
|
||||
#: danmaku2ass.py:690 danmaku2ass.py:738
|
||||
#: danmaku2ass.py:688 danmaku2ass.py:736
|
||||
msgid "(FONT) sans-serif"
|
||||
msgstr "(FONT) MS PGothic"
|
||||
|
||||
#: danmaku2ass.py:719
|
||||
#: danmaku2ass.py:717
|
||||
#, python-format
|
||||
msgid "Unknown comment file format: %s"
|
||||
msgstr "未知のコメントファイル形式:%s"
|
||||
|
||||
#: danmaku2ass.py:736
|
||||
#: danmaku2ass.py:734
|
||||
msgid "OUTPUT"
|
||||
msgstr "出力"
|
||||
|
||||
#: danmaku2ass.py:736
|
||||
#: danmaku2ass.py:734
|
||||
msgid "Output file"
|
||||
msgstr "出力ファイル"
|
||||
|
||||
#: danmaku2ass.py:737
|
||||
#: danmaku2ass.py:735
|
||||
msgid "WIDTHxHEIGHT"
|
||||
msgstr "幅x高"
|
||||
|
||||
#: danmaku2ass.py:737
|
||||
#: danmaku2ass.py:735
|
||||
msgid "Stage size in pixels"
|
||||
msgstr "ピクセル単位でステージのサイズ"
|
||||
|
||||
#: danmaku2ass.py:738
|
||||
#: danmaku2ass.py:736
|
||||
msgid "FONT"
|
||||
msgstr "フォント"
|
||||
|
||||
#: danmaku2ass.py:738
|
||||
#: danmaku2ass.py:736
|
||||
#, python-format
|
||||
msgid "Specify font face [default: %s]"
|
||||
msgstr "フォントを指定する [デフォルト: %s]"
|
||||
|
||||
#: danmaku2ass.py:739
|
||||
#: danmaku2ass.py:737
|
||||
msgid "SIZE"
|
||||
msgstr "サイズ"
|
||||
|
||||
#: danmaku2ass.py:739
|
||||
#: danmaku2ass.py:737
|
||||
#, python-format
|
||||
msgid "Default font size [default: %s]"
|
||||
msgstr "デフォルトのフォントサイズ [デフォルト: %s]"
|
||||
|
||||
#: danmaku2ass.py:740
|
||||
#: danmaku2ass.py:738
|
||||
msgid "ALPHA"
|
||||
msgstr "アルファ"
|
||||
|
||||
#: danmaku2ass.py:740
|
||||
#: danmaku2ass.py:738
|
||||
msgid "Text opaque"
|
||||
msgstr "テキストの不透明度"
|
||||
|
||||
#: danmaku2ass.py:741
|
||||
#: danmaku2ass.py:739
|
||||
msgid "SECONDS"
|
||||
msgstr "秒数"
|
||||
|
||||
#: danmaku2ass.py:741
|
||||
#: danmaku2ass.py:739
|
||||
#, python-format
|
||||
msgid "Duration of comment display [default: %s]"
|
||||
msgstr "コメント表示の時間 [デフォルト: %s]"
|
||||
|
||||
#: danmaku2ass.py:742
|
||||
#: danmaku2ass.py:740
|
||||
msgid "HEIGHT"
|
||||
msgstr "高度"
|
||||
|
||||
#: danmaku2ass.py:742
|
||||
#: danmaku2ass.py:740
|
||||
msgid "Reserve blank on the bottom of the stage"
|
||||
msgstr "ステージの下にブランクを予備する"
|
||||
|
||||
#: danmaku2ass.py:743
|
||||
#: danmaku2ass.py:741
|
||||
msgid "Reduce the amount of comments if stage is full"
|
||||
msgstr "ステージがいっぱいになったのときにコメントの量を減らす"
|
||||
|
||||
#: danmaku2ass.py:744
|
||||
#: danmaku2ass.py:742
|
||||
msgid "FILE"
|
||||
msgstr "ファイル"
|
||||
|
||||
#: danmaku2ass.py:744
|
||||
#: danmaku2ass.py:742
|
||||
msgid "Comment file to be processed"
|
||||
msgstr "ファイルが処理されるコメント"
|
||||
|
||||
#: danmaku2ass.py:751
|
||||
#: danmaku2ass.py:749
|
||||
#, python-format
|
||||
msgid "Invalid stage size: %r"
|
||||
msgstr "無効なステージサイズ:%r"
|
||||
|
Binary file not shown.
@ -2,7 +2,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Danmaku2ASS\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2014-02-02 18:51+0800\n"
|
||||
"POT-Creation-Date: 2014-02-03 16:50+0800\n"
|
||||
"Last-Translator: Star Brilliant <m13253@hotmail.com>\n"
|
||||
"Language: zh_CN\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@ -15,92 +15,92 @@ msgid "Invalid comment: %s"
|
||||
msgstr "无效弹幕:%s"
|
||||
|
||||
#: danmaku2ass.py:158 danmaku2ass.py:192 danmaku2ass.py:235 danmaku2ass.py:317
|
||||
#: danmaku2ass.py:319 danmaku2ass.py:436 danmaku2ass.py:483 danmaku2ass.py:540
|
||||
#: danmaku2ass.py:319 danmaku2ass.py:437 danmaku2ass.py:480 danmaku2ass.py:538
|
||||
#, python-format
|
||||
msgid "Invalid comment: %r"
|
||||
msgstr "无效弹幕:%r"
|
||||
|
||||
#: danmaku2ass.py:690 danmaku2ass.py:738
|
||||
#: danmaku2ass.py:688 danmaku2ass.py:736
|
||||
msgid "(FONT) sans-serif"
|
||||
msgstr "(FONT) SimHei"
|
||||
|
||||
#: danmaku2ass.py:719
|
||||
#: danmaku2ass.py:717
|
||||
#, python-format
|
||||
msgid "Unknown comment file format: %s"
|
||||
msgstr "未知的弹幕文件格式:%s"
|
||||
|
||||
#: danmaku2ass.py:736
|
||||
#: danmaku2ass.py:734
|
||||
msgid "OUTPUT"
|
||||
msgstr "输出"
|
||||
|
||||
#: danmaku2ass.py:736
|
||||
#: danmaku2ass.py:734
|
||||
msgid "Output file"
|
||||
msgstr "输出文件"
|
||||
|
||||
#: danmaku2ass.py:737
|
||||
#: danmaku2ass.py:735
|
||||
msgid "WIDTHxHEIGHT"
|
||||
msgstr "宽x高"
|
||||
|
||||
#: danmaku2ass.py:737
|
||||
#: danmaku2ass.py:735
|
||||
msgid "Stage size in pixels"
|
||||
msgstr "舞台尺寸的像素数目"
|
||||
|
||||
#: danmaku2ass.py:738
|
||||
#: danmaku2ass.py:736
|
||||
msgid "FONT"
|
||||
msgstr "字体"
|
||||
|
||||
#: danmaku2ass.py:738
|
||||
#: danmaku2ass.py:736
|
||||
#, python-format
|
||||
msgid "Specify font face [default: %s]"
|
||||
msgstr "指定字体名称 [默认: %s]"
|
||||
|
||||
#: danmaku2ass.py:739
|
||||
#: danmaku2ass.py:737
|
||||
msgid "SIZE"
|
||||
msgstr "尺寸"
|
||||
|
||||
#: danmaku2ass.py:739
|
||||
#: danmaku2ass.py:737
|
||||
#, python-format
|
||||
msgid "Default font size [default: %s]"
|
||||
msgstr "默认字号 [默认: %s]"
|
||||
|
||||
#: danmaku2ass.py:740
|
||||
#: danmaku2ass.py:738
|
||||
msgid "ALPHA"
|
||||
msgstr "ALPHA"
|
||||
|
||||
#: danmaku2ass.py:740
|
||||
#: danmaku2ass.py:738
|
||||
msgid "Text opaque"
|
||||
msgstr "文字不透明度"
|
||||
|
||||
#: danmaku2ass.py:741
|
||||
#: danmaku2ass.py:739
|
||||
msgid "SECONDS"
|
||||
msgstr "秒数"
|
||||
|
||||
#: danmaku2ass.py:741
|
||||
#: danmaku2ass.py:739
|
||||
#, python-format
|
||||
msgid "Duration of comment display [default: %s]"
|
||||
msgstr "弹幕显示时长 [默认: %s]"
|
||||
|
||||
#: danmaku2ass.py:742
|
||||
#: danmaku2ass.py:740
|
||||
msgid "HEIGHT"
|
||||
msgstr "高度"
|
||||
|
||||
#: danmaku2ass.py:742
|
||||
#: danmaku2ass.py:740
|
||||
msgid "Reserve blank on the bottom of the stage"
|
||||
msgstr "在舞台底部预留空位"
|
||||
|
||||
#: danmaku2ass.py:743
|
||||
#: danmaku2ass.py:741
|
||||
msgid "Reduce the amount of comments if stage is full"
|
||||
msgstr "在舞台满时减少弹幕数量"
|
||||
|
||||
#: danmaku2ass.py:744
|
||||
#: danmaku2ass.py:742
|
||||
msgid "FILE"
|
||||
msgstr "文件"
|
||||
|
||||
#: danmaku2ass.py:744
|
||||
#: danmaku2ass.py:742
|
||||
msgid "Comment file to be processed"
|
||||
msgstr "将要处理的弹幕文件"
|
||||
|
||||
#: danmaku2ass.py:751
|
||||
#: danmaku2ass.py:749
|
||||
#, python-format
|
||||
msgid "Invalid stage size: %r"
|
||||
msgstr "无效舞台尺寸:%r"
|
||||
|
Binary file not shown.
@ -2,7 +2,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Danmaku2ASS\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2014-02-02 18:51+0800\n"
|
||||
"POT-Creation-Date: 2014-02-03 16:50+0800\n"
|
||||
"Last-Translator: Star Brilliant <m13253@hotmail.com>\n"
|
||||
"Language: zh_TW\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@ -15,92 +15,92 @@ msgid "Invalid comment: %s"
|
||||
msgstr "無效彈幕:%s"
|
||||
|
||||
#: danmaku2ass.py:158 danmaku2ass.py:192 danmaku2ass.py:235 danmaku2ass.py:317
|
||||
#: danmaku2ass.py:319 danmaku2ass.py:436 danmaku2ass.py:483 danmaku2ass.py:540
|
||||
#: danmaku2ass.py:319 danmaku2ass.py:437 danmaku2ass.py:480 danmaku2ass.py:538
|
||||
#, python-format
|
||||
msgid "Invalid comment: %r"
|
||||
msgstr "無效彈幕:%r"
|
||||
|
||||
#: danmaku2ass.py:690 danmaku2ass.py:738
|
||||
#: danmaku2ass.py:688 danmaku2ass.py:736
|
||||
msgid "(FONT) sans-serif"
|
||||
msgstr "(FONT) Microsoft JhengHei"
|
||||
|
||||
#: danmaku2ass.py:719
|
||||
#: danmaku2ass.py:717
|
||||
#, python-format
|
||||
msgid "Unknown comment file format: %s"
|
||||
msgstr "未知的彈幕檔案格式:%s"
|
||||
|
||||
#: danmaku2ass.py:736
|
||||
#: danmaku2ass.py:734
|
||||
msgid "OUTPUT"
|
||||
msgstr "輸出"
|
||||
|
||||
#: danmaku2ass.py:736
|
||||
#: danmaku2ass.py:734
|
||||
msgid "Output file"
|
||||
msgstr "輸出檔案"
|
||||
|
||||
#: danmaku2ass.py:737
|
||||
#: danmaku2ass.py:735
|
||||
msgid "WIDTHxHEIGHT"
|
||||
msgstr "寬x高"
|
||||
|
||||
#: danmaku2ass.py:737
|
||||
#: danmaku2ass.py:735
|
||||
msgid "Stage size in pixels"
|
||||
msgstr "舞臺尺寸的畫素數目"
|
||||
|
||||
#: danmaku2ass.py:738
|
||||
#: danmaku2ass.py:736
|
||||
msgid "FONT"
|
||||
msgstr "字型"
|
||||
|
||||
#: danmaku2ass.py:738
|
||||
#: danmaku2ass.py:736
|
||||
#, python-format
|
||||
msgid "Specify font face [default: %s]"
|
||||
msgstr "指定字型名稱 [默認: %s]"
|
||||
|
||||
#: danmaku2ass.py:739
|
||||
#: danmaku2ass.py:737
|
||||
msgid "SIZE"
|
||||
msgstr "尺寸"
|
||||
|
||||
#: danmaku2ass.py:739
|
||||
#: danmaku2ass.py:737
|
||||
#, python-format
|
||||
msgid "Default font size [default: %s]"
|
||||
msgstr "默認字型大小 [默認: %s]"
|
||||
|
||||
#: danmaku2ass.py:740
|
||||
#: danmaku2ass.py:738
|
||||
msgid "ALPHA"
|
||||
msgstr "ALPHA"
|
||||
|
||||
#: danmaku2ass.py:740
|
||||
#: danmaku2ass.py:738
|
||||
msgid "Text opaque"
|
||||
msgstr "文字不透明度"
|
||||
|
||||
#: danmaku2ass.py:741
|
||||
#: danmaku2ass.py:739
|
||||
msgid "SECONDS"
|
||||
msgstr "秒數"
|
||||
|
||||
#: danmaku2ass.py:741
|
||||
#: danmaku2ass.py:739
|
||||
#, python-format
|
||||
msgid "Duration of comment display [default: %s]"
|
||||
msgstr "彈幕顯示時長 [默認: %s]"
|
||||
|
||||
#: danmaku2ass.py:742
|
||||
#: danmaku2ass.py:740
|
||||
msgid "HEIGHT"
|
||||
msgstr "高度"
|
||||
|
||||
#: danmaku2ass.py:742
|
||||
#: danmaku2ass.py:740
|
||||
msgid "Reserve blank on the bottom of the stage"
|
||||
msgstr "在舞臺底部預留空位"
|
||||
|
||||
#: danmaku2ass.py:743
|
||||
#: danmaku2ass.py:741
|
||||
msgid "Reduce the amount of comments if stage is full"
|
||||
msgstr "在舞臺滿時減少彈幕數量"
|
||||
|
||||
#: danmaku2ass.py:744
|
||||
#: danmaku2ass.py:742
|
||||
msgid "FILE"
|
||||
msgstr "檔案"
|
||||
|
||||
#: danmaku2ass.py:744
|
||||
#: danmaku2ass.py:742
|
||||
msgid "Comment file to be processed"
|
||||
msgstr "將要處理的彈幕檔案"
|
||||
|
||||
#: danmaku2ass.py:751
|
||||
#: danmaku2ass.py:749
|
||||
#, python-format
|
||||
msgid "Invalid stage size: %r"
|
||||
msgstr "無效舞臺尺寸:%r"
|
||||
|
Loading…
Reference in New Issue
Block a user