feat(title): 标题自由位置拖拽后端支持——pos_x/pos_y 注入 \pos 定位 #1592
Reference in New Issue
Block a user
Delete Branch "feat/title-drag-position"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
工单 #1405 方案 B:标题自由位置拖拽(后端)
前端支持用户在预览画面自由拖拽标题位置,后端烧录 ASS 时按坐标定位。只改 Title(标题),Subtitle(配音字幕)逻辑不动。
改动
packages/domain/ass_subtitle_builder.py:title_config新增可选字段pos_x、pos_y(PlayRes 坐标系像素整数,PlayResX/Y = video_width/video_height)[0, video_width]×[0, video_height]闭区间内时:\an5中对齐,使\pos锚点为文本块中心){\pos(x,y)}override tag(如{\pos(540,300)}标题文本)position_to_ass_alignment、Style 行格式测试
新增 9 个单测:
{\pos(x,y)}且 TitleStyle Alignment=53140 相关测试全过。
🚀 预览环境已部署
🗑️ 预览环境已清理
PR #1592 已关闭或合并,对应的预览环境已被清理。