- UID
- 9
- 积分
- 4251
- 帖子
- 293
- 主题
- 40
- 论坛币
- 8462
- 威望
- 29
- EP值
- 1646
- MP值
- 8
- 阅读权限
- 100
- 注册时间
- 2011-8-3
- 在线时间
- 151 小时
- 最后登录
- 2022-8-8
|
- from tcaxPy import *
- from gdiFont import *
- from s import *
- def tcaxPy_Init():
- global _FontFileName
- global _FaceID
- global _Fs
- global _TextWidth
- global _TextHeight
- global _TextLength
- global _TextAdvDiff
- global _ResolutionX
- global _FD
- global GdiFont #GDIfont
- global Font
- _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) #GDIfont
-
- Font = InitFont(GetVal(val_FontFileName), GetVal(val_FaceID), _Fs, GetVal(val_Spacing), GetVal(val_SpaceScale), 0xFFFFFF, 0, 0)
-
- def tcaxPy_Fin():
- gfFinFont(GdiFont) #GDIfont
-
- FinFont(Font)
- def tcaxPy_Main(_i, _j, _n, _BT, _ET, _SK, _KT, _x, _y, _a, _txt):
- ASS_BUF = []
-
- if _i < 3 or _i == 21:
- R = randint(0,15)
- dx = _x - int((_a + GetVal(val_Spacing)) / 2 + 0.5)
- dy = _y - int(_Fs / 2 + 0.5)
-
- COLOR1 = vc1('E9C4BC','E9C4BC','E9865E','E9865E')
- COLOR2 = vc1('E9865E','E9865E','E9C4BC','E9C4BC')
- COLOR3 = vc1('E9C4BC','E9865E','E9C4BC','E4987E')
- COLOR4 = vc1('E9865E','E9C4BC','E9865E','E9C4BC')
- COLOR = [COLOR1,COLOR2,COLOR3,COLOR4]
- RCOLOR = COLOR[randint(0,3)]
-
- mask1 = gfGetOutline(GdiFont, _txt, dx-_ResolutionX/2+_TextLength[_i]/2, dy) #GDIfont 中間
-
-
- ass_main(ASS_BUF, SubL(_BT-8+_j*5,_ET+_j*5,3),an(5)+pos(_x-_ResolutionX/2+_TextLength[_i]/2, _y)+color3("8F371A")+fad(200,0)+bord(4), _txt)
- ass_main(ASS_BUF, SubL(_BT-8+_j*5,_ET+_j*5,3),an(5)+pos(_x-_ResolutionX/2+_TextLength[_i]/2, _y)+RCOLOR+fad(200,0)+bord(2), _txt)
-
- for a in range(_BT-8+_j*5,_BT+_SK+20,8):
- MOV = move(_x-_ResolutionX/2+_TextLength[_i]/2, _y,_x-_ResolutionX/2+_TextLength[_i]/2+randint(-20,20), _y+randint(-20,20))
- ass_main(ASS_BUF, SubL(a,a+50,3),an(7)+MOV+color1("FFFFFF")+fad(200,200)+bord(0)+frz(randint(0,360))+blur(2.5)+clip2(4, mask1)+p(3), "m -11 -11 l -11 -3 l -14 12 l 5 13 l 10 2 l 14 -13 ")
-
- ass_main(ASS_BUF, SubL(_BT+_SK-10,_BT+_SK+_KT+10,7),pos(_x-_ResolutionX/2+_TextLength[_i]/2, _y)+color1("6228E3")+t(200,_KT,color1("9D6217"))+bord(0), _txt)
- ass_main(ASS_BUF, SubL(_BT+_SK+_KT+10,_ET+_j*5,7),pos(_x-_ResolutionX/2+_TextLength[_i]/2, _y)+color1("9D6217")+bord(0), _txt)
-
- ass_main(ASS_BUF, SubL(_ET+_j*5,_ET+15+_j*5,3),an(5)+move(_x-_ResolutionX/2+_TextLength[_i]/2, _y,_x-_ResolutionX/2+_TextLength[_i]/2, _y-_Fs-10)+color3("8F371A")+fad(0,200)+bord(4), _txt)
- ass_main(ASS_BUF, SubL(_ET+_j*5,_ET+15+_j*5,3),an(5)+move(_x-_ResolutionX/2+_TextLength[_i]/2, _y,_x-_ResolutionX/2+_TextLength[_i]/2, _y-_Fs-10)+color1("9D6217")+fad(0,200)+bord(2), _txt)
-
-
- if _i == 3 or _i == 6 or _i == 9: #左邊
- dx = _x - int((_a + GetVal(val_Spacing)) / 2 + 0.5)
- dy = _y - int(_Fs / 2 + 0.5)
-
- ass_main(ASS_BUF, SubL(_BT+_SK-100,_ET+_j*5,3),an(5)+move(_x-_ResolutionX+_TextLength[_i]+23, _y-_Fs-10,_x-_ResolutionX+_TextLength[_i]+23, _y,0,400)+fad(200,0)+color1("000000")+fscx(_a*100/10)+fscy(380)+bord(0), "{\p1}m 0 0 b 0 3 0 7 0 10 b 3 10 7 10 10 10 b 10 7 10 3 10 0 b 7 0 3 0 0 0 {\p0}")
- ass_main(ASS_BUF, SubL(_ET+_j*5,_ET+15+_j*5,3),an(5)+move(_x-_ResolutionX+_TextLength[_i]+23, _y,_x-_ResolutionX+_TextLength[_i]+23, _y-_Fs-10)+fad(0,200)+color1("000000")+fscx(_a*100/10)+fscy(380)+bord(0), "{\p1}m 0 0 b 0 3 0 7 0 10 b 3 10 7 10 10 10 b 10 7 10 3 10 0 b 7 0 3 0 0 0 {\p0}")
-
- ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_ET+_j*5,3),an(5)+pos(_x-_ResolutionX+_TextLength[_i]+25, _y)+color1("D8D8D8")+bord(0), _txt)
- ass_main(ASS_BUF, SubL(_ET+_j*5,_ET+15+_j*5,3),an(5)+move(_x-_ResolutionX+_TextLength[_i]+25, _y,_x-_ResolutionX+_TextLength[_i]+25, _y-_Fs-10)+color1("D8D8D8")+bord(0), _txt)
-
- bx = _x - int(_a / 2 + 0.5)-_ResolutionX+_TextLength[_i]+25-1
- by = _y - int(_Fs / 2 + 0.5)-1
- CLIP = clip(bx,by,bx+_a+20,by+_Fs+5)
- ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_BT+_SK+_KT+50,3),an(5)+CLIP+move(_x-_ResolutionX+_TextLength[_i]+25, _y,_x-_ResolutionX+_TextLength[_i]+25, _y+_Fs+10)+color1("000000")+bord(0), _txt)
-
- outline = TextOutlinePoints(Font, _txt, 1.0)
- num = len(outline)
- for i in range(num):
- ts1 = _BT + _SK +int(i/num*_KT)-20
- te1 = _BT + _SK +int(i/num*_KT)+50
- x = dx + outline[i][0]-_ResolutionX+_TextLength[_i]+24
- y = dy + outline[i][1]
- EFT = pos(x, y)+alpha1(0)+alpha3(0)+bord(0.5)+blur(2)+shad(0)+color3('FFFFFF')+color1('FFFFFF')+fad(200, 200)
- ass_main(ASS_BUF, SubL(ts1, te1, 3, Pix_Style), EFT, PixPt())
-
-
-
- if _i == 4 or _i == 5 or _i == 7 or _i == 8 or _i == 10: #右邊
- dx = _x - int((_a + GetVal(val_Spacing)) / 2 + 0.5)
- dy = _y - int(_Fs / 2 + 0.5)
-
- ass_main(ASS_BUF, SubL(_BT+_SK-100,_ET+_j*5,3),an(5)+move(_x-2, _y-_Fs-10,_x-2, _y,0,400)+fad(200,0)+color1("000000")+fscx(_a*100/10)+fscy(380)+bord(0), "{\p1}m 0 0 b 0 3 0 7 0 10 b 3 10 7 10 10 10 b 10 7 10 3 10 0 b 7 0 3 0 0 0 {\p0}")
- ass_main(ASS_BUF, SubL(_ET+_j*5,_ET+15+_j*5,3),an(5)+move(_x-2, _y,_x-2, _y-_Fs-10)+fad(0,200)+color1("000000")+fscx(_a*100/10)+fscy(380)+bord(0), "{\p1}m 0 0 b 0 3 0 7 0 10 b 3 10 7 10 10 10 b 10 7 10 3 10 0 b 7 0 3 0 0 0 {\p0}")
-
- ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_ET+_j*5,3),an(5)+pos(_x, _y)+color1("D8D8D8")+bord(0), _txt)
- ass_main(ASS_BUF, SubL(_ET+_j*5,_ET+15+_j*5,3),an(5)+move(_x, _y,_x, _y-_Fs-10)+color1("D8D8D8")+bord(0), _txt)
-
- bx = _x - int(_a / 2 + 0.5)-1
- by = _y - int(_Fs / 2 + 0.5)-1
- CLIP = clip(bx,by,bx+_a+20,by+_Fs+5)
- ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_BT+_SK+_KT+50,3),an(5)+CLIP+move(_x, _y,_x, _y+_Fs+10)+color1("000000")+bord(0), _txt)
-
-
- outline = TextOutlinePoints(Font, _txt, 1.0)
- num = len(outline)
- for i in range(num):
- ts1 = _BT + _SK +int(i/num*_KT)-20
- te1 = _BT + _SK +int(i/num*_KT)+50
- x = dx + outline[i][0]
- y = dy + outline[i][1]
- EFT = pos(x, y)+alpha1(0)+alpha3(0)+bord(0.5)+blur(2)+shad(0)+color3('FFFFFF')+color1('FFFFFF')+fad(200, 200)
- ass_main(ASS_BUF, SubL(ts1, te1, 3, Pix_Style), EFT, PixPt())
-
- if _i == 11 or _i > 10 and _i < 21:
- dx = _x - int((_a + GetVal(val_Spacing)) / 2 + 0.5)
- dy = _y - int(_Fs / 2 + 0.5)
-
- ass_main(ASS_BUF, SubL(_BT+_SK-100,_ET+_j*5,3),an(5)+move(_x-_ResolutionX/2+_TextLength[_i]/2+12, _y-_Fs-10,_x-_ResolutionX/2+_TextLength[_i]/2+10, _y,0,400)+fad(200,0)+color1("000000")+fscx(_a*100/10)+fscy(380)+bord(0), "{\p1}m 0 0 b 0 3 0 7 0 10 b 3 10 7 10 10 10 b 10 7 10 3 10 0 b 7 0 3 0 0 0 {\p0}")
- ass_main(ASS_BUF, SubL(_ET+_j*5,_ET+15+_j*5,3),an(5)+move(_x-_ResolutionX/2+_TextLength[_i]/2+12, _y,_x-_ResolutionX/2+_TextLength[_i]/2+10, _y-_Fs-10)+fad(0,200)+color1("000000")+fscx(_a*100/10)+fscy(380)+bord(0), "{\p1}m 0 0 b 0 3 0 7 0 10 b 3 10 7 10 10 10 b 10 7 10 3 10 0 b 7 0 3 0 0 0 {\p0}")
-
- ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_ET+_j*5,3),an(5)+pos(_x-_ResolutionX/2+_TextLength[_i]/2+12, _y)+color1("D8D8D8")+bord(0), _txt)
- ass_main(ASS_BUF, SubL(_ET+_j*5,_ET+15+_j*5,3),an(5)+move(_x-_ResolutionX/2+_TextLength[_i]/2+12, _y,_x-_ResolutionX/2+_TextLength[_i]/2+12, _y-_Fs-10)+color1("D8D8D8")+bord(0), _txt)
-
- bx = _x - int(_a / 2 + 0.5)-1-_ResolutionX/2+_TextLength[_i]/2
- by = _y - int(_Fs / 2 + 0.5)-1
- CLIP = clip(bx,by,bx+_a+20,by+_Fs+5)
- ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_BT+_SK+_KT+50,3),an(5)+CLIP+move(_x-_ResolutionX/2+_TextLength[_i]/2+12, _y,_x-_ResolutionX/2+_TextLength[_i]/2+12, _y+_Fs+10)+color1("000000")+bord(0), _txt)
-
- #有沒有粒子映射
- # outline = TextOutlinePoints(Font, _txt, 1.0)
- # outnline = TextOutlinePoints(_FontFileName, _FaceID, 45, _txt, 1.0)
- # outnum = len(outline)
- # outnnum = len(outnline)
- # num = max(outnum,outnnum)
- # for i in range(outnum):
- # indice_out = i
- # indice_toun = randint(0, outnum - 1)
-
- # ts1 = _BT + _SK +int(i/num*_KT)-20
- # te1 = _BT + _SK +int(i/num*_KT)+50
- # x = dx + outline[i][0]-_ResolutionX/2+_TextLength[_i]/2+12
- # y = dy + outline[i][1]
-
- # x1 = dx + outnline[indice_toun][0]-_ResolutionX/2+_TextLength[_i]/2+5
- # y1 = dy + outnline[indice_toun][1]-5
- # EFT = move(x, y, x1, y1, 100,700)+alpha1(0)+alpha3(0)+bord(0.5)+blur(2)+shad(0)+color3('D6ABFF')+color1('D6ABFF')+fad(200, 200)
- # ass_main(ASS_BUF, SubL(ts1, te1, 3, Pix_Style), EFT, PixPt())
-
-
-
- #沒有粒子映射
- outline = TextOutlinePoints(Font, _txt, 1.0)
- outnline = TextOutlinePoints(_FontFileName, _FaceID, 45, _txt, 1.0)
- num = len(outline)
- for i in range(num):
- ts1 = _BT + _SK +int(i/num*_KT)-20
- te1 = _BT + _SK +int(i/num*_KT)+50
- x = dx + outline[i][0]-_ResolutionX/2+_TextLength[_i]/2+12
- y = dy + outline[i][1]
-
- x1 = dx + outnline[i][0]-_ResolutionX/2+_TextLength[_i]/2+5
- y1 = dy + outnline[i][1]-5
- EFT = mov(x, y, x1, y1)+alpha1(0)+alpha3(0)+bord(0.5)+blur(2)+shad(0)+color3('D6ABFF')+color1('D6ABFF')+fad(0, 300)
- ass_main(ASS_BUF, SubL(ts1, te1, 3, Pix_Style), EFT, PixPt())
-
-
- return (ASS_BUF, None)
复制代码 老样子一些东西写了没用 没整理 预览群邮了 |
-
4
查看全部评分
-
|