- UID
- 1462
- 积分
- 666
- 帖子
- 77
- 主题
- 13
- 论坛币
- 1086
- 威望
- 2
- EP值
- 446
- MP值
- 0
- 阅读权限
- 50
- 注册时间
- 2013-9-6
- 在线时间
- 140 小时
- 最后登录
- 2024-2-28
|
本帖最后由 Alex 于 2013-11-13 18:31 编辑
Ok
I'm trying to make a square clip by using text metrics ( Height & width Only)
but I got a problem -_-
Why I can't use %d ?
Im using a normal "\k"- from tcaxPy import *
- def tcaxPy_Init():
- global _FD
- global _Blur
- global _text
- global _textLength
- global _width
- global _height
- global _advance
- global _fx_width
- global _fx_height
- _fx_width = GetVal (val_ResolutionX)
- _fx_height = GetVal (val_ResolutionY)
- _text = GetVal (val_Text)
- _textLength = GetVal (val_TextLength)
- _width = GetVal(val_TextWidth)
- _height = GetVal (val_TextHeight)
- _advance = GetVal (val_TextAdvance)
- _FD = 1000 / GetVal(val_FXFPS)
- _Blur = GetVal(val_Blur)
- def tcaxPy_Fin():
- pass
-
- def tcaxPy_Main(_i, _j, _n, _start, _end, _elapk, _k, _x, _y, _a, _txt):
- ASS_BUF = []
- TCAS_BUF = []
- x = _x
- y = _y
- text = "{\\pos(%d,%d)\\clip(m %d %d l %d %d l %d %d)} " % (x,y, _width[_i],y-10,x+10,y-10,x+10,y+10)
- text1 = "{\\pos(%d,%d)}%s" % (x,y,_txt)
- ass_main(ASS_BUF, SubL(_start , _end , 2), '', text)
- ass_main(ASS_BUF, SubL(_start , _end , 2), '', text1)
- return (ASS_BUF, TCAS_BUF)
复制代码 |
|