- UID
- 1462
- 积分
- 667
- 帖子
- 77
- 主题
- 13
- 论坛币
- 1091
- 威望
- 2
- EP值
- 447
- MP值
- 0
- 阅读权限
- 50
- 注册时间
- 2013-9-6
- 在线时间
- 141 小时
- 最后登录
- 2024-5-25
|
Hi everyone
I was trying to make gradation colors but i got problem
my code- from tcaxPy import *
- def tcaxPy_Init():
- global _FontFileName
- global _FaceID
- global _Fs
- global _Wd
- global _Ht
- global _Dx
- global _Dy
- global _Spc
- global _Sps
- global _Br
- global _FD
- global COLOR
- _FontFileName = GetVal(val_FontFileName)
- _FaceID = GetVal(val_FaceID)
- _Fs = GetVal(val_FontSize)
- _Wd = GetVal(val_ResolutionX)
- _Ht = GetVal(val_ResolutionY)
- _Dx = GetVal(val_OffsetX)
- _Dy = GetVal(val_OffsetY)
- _Spc = GetVal(val_Spacing)
- _Sps = GetVal(val_SpaceScale)
- _Br = GetVal(val_Blur)
- _FD = 1000 / GetVal(val_FXFPS)
- COLOR = DivClr(GetVal(val_1C), GetVal(val_2C), _Fs)
- global _FontSize
- global pyFont
- _FontSize = GetVal(val_FontSize)
- pyFont = InitFont(GetVal(val_FontFileName), GetVal(val_FaceID), GetVal(val_FontSize), GetVal(val_Spacing), GetVal(val_SpaceScale), 0x0000FF, 0, 0)
-
- def tcaxPy_Main(_i, _j, _n, _BT, _ET, _SK, _KT, _X, _Y, _A, _TXT):
- ASS_BUF = []
- TCAS_BUF = []
- _7X = _X - int(_A / 2 + 0.5)
- _7Y = _Y - int(_FontSize / 2 + 0.5)
- _H = _FontSize
- if _i==0:
- Blur = blur(2)
- Be = be(1)
- Bord =bord(2)
- for i in range(_H + 2):
- CLIP = clip(_7X - 1-5, _7Y + i - 1, _7X + 1 + _H+5, _7Y + i)
- M = t1(0,50,mov(_X,_Y,_X+randint(-2,2),_Y))+ color1(COLOR[i])+t1(50,100,mov(_X,_Y,_X+randint(-2,2),_Y))+t1(100,150,mov(_X,_Y,_X+randint(-2,2),_Y))
- for k in range(AdvInt(_KT/10)):
- ass_main(ASS_BUF, SubL(_BT+_SK+k*10,_BT+_SK+(k+1)*10),Be +Blur+ Bord + M +CLIP, _TXT)
- ass_main(ASS_BUF, SubL(_BT+_SK+(k+1)*10,_ET),pos(_X,_Y)+Be +Blur+Bord, _TXT)
- return (ASS_BUF, TCAS_BUF)
复制代码 |
|