- UID
- 5830
- 积分
- 7
- 帖子
- 2
- 主题
- 1
- 论坛币
- 23
- 威望
- 0
- EP值
- 4
- MP值
- 0
- 阅读权限
- 10
- 注册时间
- 2023-3-2
- 在线时间
- 1 小时
- 最后登录
- 2023-3-21
|
from tcaxPy import *
def tcaxPy_Init():
global _Fs
global Font
_Fs = GetVal(val_FontSize)
Font = InitFont(GetVal(val_FontFileName), GetVal(val_FaceID), _Fs, GetVal(val_Spacing), GetVal(val_SpaceScale), 0xFFFFFF, 0, 0)
def tcaxPy_Main(_i, _j, _n, _BT, _ET, _SK, _KT, _X, _Y, _A, _TXT):
ASS_BUF = []
DY = _Y - 13
ass_main(ASS_BUF, SubL(_BT + 200, _ET), pos(_X, DY) + color1('00FFFF') + bord(0) + blur(4) + fad(400, 0), _TXT)
dx = _X - int(_A / 2 + 0.5)
dy = DY - int(_Fs / 2 + 0.5)
outline = TextOutlinePoints(Font, _TXT, 1.0)
num = len(outline)
dur = 200
for i in range(num):
ts = _BT + dur * i / num
te = _ET
x = dx + outline[i][0]
y = dy + outline[i][1]
EFT = pos(x, y) + alpha1(0) + alpha3(150) + alpha4(200) + bord(1) + shad(1) + be(1) + \
color1('0000FF') + color3('FF00FF') + color4('FFFF00') + fad(200, 0)
ass_main(ASS_BUF, SubL(ts, te, 1, Pix_Style), EFT, PixPt())
return (ASS_BUF, None)
模板内容是这样的 |
|