- UID
- 2
- 积分
- 8682
- 帖子
- 2905
- 主题
- 199
- 论坛币
- 11741
- 威望
- 16
- EP值
- 2349
- MP值
- 15
- 阅读权限
- 200
- 注册时间
- 2011-8-3
- 在线时间
- 2597 小时
- 最后登录
- 2024-8-28
|
主要借助由 tcaxLib.pyd 提供的 TextOutlinePoints 函数获取文字边框点集, 然后按顺序将其显示出来.- 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_Fin():
- FinFont(Font)
- def tcaxPy_Main(_i, _j, _n, _BT, _ET, _SK, _KT, _X, _Y, _A, _TXT):
- ASS_BUF = []
- TCS_BUF = []
- ass_main(ASS_BUF, SubL(_BT + 200, _ET), pos(_X, _Y) + color1('00FFFF') + bord(0) + blur(4) + fad(400, 0), _TXT)
- dx = _X - int(_A / 2 + 0.5)
- dy = _Y - 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, TCS_BUF)
复制代码 |
-
2
查看全部评分
-
|