- UID
- 9
- 积分
- 4251
- 帖子
- 293
- 主题
- 40
- 论坛币
- 8462
- 威望
- 29
- EP值
- 1646
- MP值
- 8
- 阅读权限
- 100
- 注册时间
- 2011-8-3
- 在线时间
- 151 小时
- 最后登录
- 2022-8-8
|
本帖最后由 四月一日 君寻 于 2012-7-19 08:56 编辑
- from tcaxPy import *
- from gdiFont import *
- def tcaxPy_Init():
- global _FontFileName
- global _FaceID
- global _Fs
- global _TextWidth
- global _TextHeight
- global _TextLength
- global _TextAdvDiff
- global _ResolutionX
- global _FD
- global _Font
- global _GdiFont
- _FontFileName = GetVal(val_FontFileName)
- _FaceID = GetVal(val_FaceID)
- _Fs = GetVal(val_FontSize)
- _TextHeight = GetVal(val_TextHeight)
- _TextWidth = GetVal(val_TextWidth)
- _TextLength = GetVal(val_TextLength)
- _TextAdvDiff = GetVal(val_TextAdvanceDiff)
- _ResolutionX = GetVal(val_ResolutionX)
- _FD = 1000 / GetVal(val_FXFPS)
- _GdiFont = gfInitFont(GetVal(val_FontFaceName), _Fs, GetVal(val_Spacing), GetVal(val_SpaceScale), 0, False)
-
- def tcaxPy_Fin():
- gfFinFont(_GdiFont)
- def tcaxPy_Main(_i, _j, _n, _BT, _ET, _SK, _KT, _x, _y, _a, _txt):
- ASS_BUF = []
- dx = _x - int(_a / 2 + 0.5) # 一个固定操作, 将an5的坐标转换为an7
- dy = _y - int(_Fs / 2 + 0.5) # ASS特效默认采用an5坐标, TCAS特效则采用an7坐标
- TUX2 = '{\p3}m 30 23 b 24 23 24 33 30 33 b 36 33 37 23 30 23 m 35 27 l 61 28 l 35 29 m 26 27 l 0 28 l 26 29 m 29 23 l 30 0 l 31 23 m 29 33 l 30 57 l 31 33 '
- COLOR = ['0061FF','00CCFF','D5CFFE', '008100']
- COLOR1=color1(choice(COLOR))
- COLOR3=color3(choice(COLOR))
-
- B = RandCir2(_x, _y, 14, 15)
-
-
-
- if _j == 0:
- global CLR
- CLR = DivClr('0061FF', '008100', 4)
- CLR.extend(DivClr('008100', '00CCFF', 5))
- CLR.extend(DivClr('00CCFF', 'D5CFFE', _n - 4 - 5))
-
-
- global CLR2
- CLR2 = DivClr('0061FF', 'D5CFFE', _n)
-
- global CLR3
- CLR3 = DivClr('008100', '00CCFF', _n)
-
- mask = gfGetOutline(_GdiFont, _txt, dx, dy)
-
- if _i == 0:
- ass_main(ASS_BUF, SubL(_BT-20+_j*5,_BT+(_j+1)*5,1),an(5)+pos(_x, _y)+fad(200,0)+bord(2)+blur(2)+color3('0061FF'), _txt)
- ass_main(ASS_BUF, SubL(_BT+(_j+1)*5,_BT+_SK,1),an(5)+pos(_x, _y)+bord(2)+blur(2)+color3('0061FF'), _txt)
- ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT,1),an(5)+pos(_x, _y)+bord(2)+blur(2)+color3('0061FF')+t(color3('FFFFFF')), _txt)
- ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_ET,1),an(5)+pos(_x, _y)+bord(2)+blur(2)+color3('FFFFFF'), _txt)
- ass_main(ASS_BUF, SubL(_ET,_ET+10+_j*5,1),an(5)+pos(_x, _y)+fad(0,200)+bord(2)+blur(2)+color3('FFFFFF'), _txt)
-
-
- elif _i == 1:
- ass_main(ASS_BUF, SubL(_BT-20+_j*5,_BT+(_j+1)*5,1),an(5)+pos(_x, _y)+fad(200,0)+bord(2)+blur(2)+color3('008100'), _txt)
- ass_main(ASS_BUF, SubL(_BT+(_j+1)*5,_BT+_SK,1),an(5)+pos(_x, _y)+bord(2)+blur(2)+color3('008100'), _txt)
- ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT,1),an(5)+pos(_x, _y)+bord(2)+blur(2)+color3('008100')+t(color3('FFFFFF')), _txt)
- ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_ET,1),an(5)+pos(_x, _y)+bord(2)+blur(2)+color3('FFFFFF'), _txt)
- ass_main(ASS_BUF, SubL(_ET,_ET+10+_j*5,1),an(5)+pos(_x, _y)+fad(0,200)+bord(2)+blur(2)+color3('FFFFFF'), _txt)
-
- elif _i == 2:
- ass_main(ASS_BUF, SubL(_BT-20+_j*5,_BT+(_j+1)*5,1),an(5)+pos(_x, _y)+fad(200,0)+bord(2)+blur(2)+color3('00CCFF'), _txt)
- ass_main(ASS_BUF, SubL(_BT+(_j+1)*5,_BT+_SK,1),an(5)+pos(_x, _y)+bord(2)+blur(2)+color3('00CCFF'), _txt)
- ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT,1),an(5)+pos(_x, _y)+bord(2)+blur(2)+color3('00CCFF')+t(color3('FFFFFF')), _txt)
- ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_ET,1),an(5)+pos(_x, _y)+bord(2)+blur(2)+color3('FFFFFF'), _txt)
- ass_main(ASS_BUF, SubL(_ET,_ET+10+_j*5,1),an(5)+pos(_x, _y)+fad(0,200)+bord(2)+blur(2)+color3('FFFFFF'), _txt)
-
- elif _i == 3:
- ass_main(ASS_BUF, SubL(_BT-20+_j*5,_BT+(_j+1)*5,1),an(5)+pos(_x, _y)+fad(200,0)+bord(2)+blur(2)+color3('A9A9FF'), _txt)
- ass_main(ASS_BUF, SubL(_BT+(_j+1)*5,_BT+_SK,1),an(5)+pos(_x, _y)+bord(2)+blur(2)+color3('A9A9FF'), _txt)
- ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT,1),an(5)+pos(_x, _y)+bord(2)+blur(2)+color3('A9A9FF')+t(color3('FFFFFF')), _txt)
- ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_ET,1),an(5)+pos(_x, _y)+bord(2)+blur(2)+color3('FFFFFF'), _txt)
- ass_main(ASS_BUF, SubL(_ET,_ET+10+_j*5,1),an(5)+pos(_x, _y)+fad(0,200)+bord(2)+blur(2)+color3('FFFFFF'), _txt)
-
-
- if _i > -1 and _i < 4:
- ass_main(ASS_BUF, SubL(_BT+_SK-10,_ET,3),an(5)+pos(B[0],B[1])+color1('FF8000')+bord(0)+blur(6)+alpha1(0)+fs(1)+t(0,_KT*10,fs(60))+clip2(4, mask), "●")
- ass_main(ASS_BUF, SubL(_ET,_ET+20+_j*5,3),an(5)+pos(B[0],B[1])+color1('FF8000')+bord(0)+blur(6)+alpha1(0)+fs(60)+fad(0,200)+clip2(4, mask), "●")
-
- elif _i > 3 and _i < 9:
- ass_main(ASS_BUF, SubL(_BT-20+_j*5,_BT+(_j+1)*5,1),an(5)+pos(_x, _y)+fad(200,0)+bord(2)+blur(2)+color3(CLR[_j]), _txt)
- ass_main(ASS_BUF, SubL(_BT+(_j+1)*5,_BT+_SK,1),an(5)+pos(_x, _y)+bord(2)+blur(2)+color3(CLR[_j]), _txt)
- ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT,1),an(5)+pos(_x, _y)+bord(2)+blur(2)+color3(CLR[_j])+t(color3('FFFFFF')), _txt)
- ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_ET,1),an(5)+pos(_x, _y)+bord(2)+blur(2)+color3('FFFFFF'), _txt)
- ass_main(ASS_BUF, SubL(_ET,_ET+10+_j*5,1),an(5)+pos(_x, _y)+fad(0,200)+bord(2)+blur(2)+color3('FFFFFF'), _txt)
-
- elif _i > 8:
- if _j == 0:
- global COO
- COO = DivClr('0061FF', '008100', 2)
- COO.extend(DivClr('008100', '00CCFF', 3))
- COO.extend(DivClr('00CCFF', 'D5CFFE', _n - 2 - 3))
-
- ass_main(ASS_BUF, SubL(_BT-20+_j*5,_BT+(_j+1)*5,1),an(5)+pos(_x, _y)+fad(200,0)+bord(2)+blur(2)+color3(COO[_j]), _txt)
- ass_main(ASS_BUF, SubL(_BT+(_j+1)*5,_BT+_SK,1),an(5)+pos(_x, _y)+bord(2)+blur(2)+color3(COO[_j]), _txt)
- ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT,1),an(5)+pos(_x, _y)+bord(2)+blur(2)+color3(COO[_j])+t(color3('FFFFFF')), _txt)
- ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_ET,1),an(5)+pos(_x, _y)+bord(2)+blur(2)+color3('FFFFFF'), _txt)
- ass_main(ASS_BUF, SubL(_ET,_ET+10+_j*5,1),an(5)+pos(_x, _y)+fad(0,200)+bord(2)+blur(2)+color3('FFFFFF'), _txt)
-
- if _i >3:
- ass_main(ASS_BUF, SubL(_BT+_SK-10,_ET,3),an(5)+pos(B[0],B[1])+color1('FF8000')+bord(0)+blur(6)+alpha1(0)+fs(1)+t(0,_KT*10,fs(60))+clip2(4, mask), "●")
- ass_main(ASS_BUF, SubL(_ET,_ET+20+_j*5,3),an(5)+pos(B[0],B[1])+color1('FF8000')+bord(0)+blur(6)+alpha1(0)+fs(60)+t(fs(1))+fad(0,200)+clip2(4, mask), "●")
-
- if _i > -1:
- C = ['0061FF','00CCFF','D5CFFE', '008100']
- T = -_n*3
-
- for i in range(int(_BT+_SK-30),int(_ET-_j*(T)/_n),30):
- for j in range (int(_a/30)):
- X = [_x+randint(int(-_a/2),int(_a/2)),_y+randint(-20,20)]
- R = RandCir2(_x, _y, 25, 27)
- D = sqrt((X[0]-R[0])**2+(X[1]-R[1])**2)
- CO = choice(C)
- F =randint(60,110)
- FS = fsc(F,F)
- angel =randint(-360,360)
- for k in range(0,130,40):
- ass_main(ASS_BUF, SubL( i+k, i+k + 50,1),fad(120,120)+ mov(X[0]+(X[0]-R[0])/130*k,X[1]+(X[1]-R[1])/130*k,X[0]+(X[0]-R[0])/130*(k+50),X[1]+(X[1]-R[1])/130*(k+50))+color1('FFFFFF')+color3(CO)+alpha(20)+bord(1.2)+blur(2)+frz(angel)+FS, '{\\p3}m 20 0 b 20 10 30 20 40 20 b 30 20 20 30 20 40 b 20 30 10 20 0 20 b 10 20 20 10 20 0')
-
-
-
- return (ASS_BUF, None)
复制代码
算是一个GDIfont的例子吧 这次是mask的 代码挺简单 最近没撸内置撸不出- -没东西放上来(逃
预览:
感谢 哔哔姐 上传
|
-
2
查看全部评分
-
|