- UID
- 3
- 积分
- 8169
- 帖子
- 259
- 主题
- 68
- 论坛币
- 5016
- 威望
- 54
- EP值
- 2533
- MP值
- 20
- 阅读权限
- 200
- 注册时间
- 2011-8-3
- 在线时间
- 1097 小时
- 最后登录
- 2022-10-8
|
預覽:http://pan.baidu.com/s/1hqqY9CC#dir/path=%2FSaiyakuFX_Preview
算是mask 和bezier 简单的范例吧- from tcaxPy import *
- def pbri(n = 4):
- BRI = 'm 0 100 l 1 1 100 0 1 -1 0 -100 -1 -1 -100 0 -1 1 c m 6 6 s 6 -6 -6 -6 -6 6 c'
- PBRI = '{\\p'+str(n)+'}'+BRI
- return PBRI
- def exint(x):
- if x >= 0 :
- x = int(x)
- else:
- x = 0
- return x
- def tcaxPy_Init():
- global _FontFileName
- global _FaceID
- global _Fs
- global _Height
- global Font
- _FontFileName = GetVal(val_FontFileName)
- _FaceID = GetVal(val_FaceID)
- _Fs = GetVal(val_FontSize)
- _Height = GetVal(val_TextHeight)
- Font = InitFont(_FontFileName, _FaceID, _Fs, GetVal(val_Spacing), GetVal(val_SpaceScale), 0xFFFFFF, 0, 0)
- def tcaxPy_Main(_i, _j, _n, _BT, _ET, _SK, _KT, _X, _Y, _A, _TXT):
- ASS_BUF = []
- TCS_BUF = []
- dx = _X - int(_A / 2 + 0.5)
- dy = _Y - int(_Fs / 2 + 0.5)
- mask = TextOutlineDraw(Font, _TXT, dx, dy)
- if _i<7:
- ass_main(ASS_BUF, SubL(_BT+_SK-20, _ET,10), an(5) + pos(_X+randint(-16,16), _Y+randint(-16,16))+fs(1)+blur(1)+color1("FFFFFF")+t(0,_KT*10,fs(65)+blur(8)) + clip2(7, mask), "●")
- for i in range(_BT+_SK-20,_BT+_SK+_KT,30):
- for k in range(3):
- ass_main(ASS_BUF, SubL(i, i+150,50), fs(5)+blur(3.5)+fad(30,300)+mov(_X+randint(30,60),_Y-randint(20,50),_X-randint(30,60),_Y+randint(20,50)), "●")
- else:
- ass_main(ASS_BUF, SubL(_BT+_SK-5, _ET,10), an(5) + pos(_X+randint(-16,16), _Y+randint(-16,16))+color1("FFFFFF")+fs(65)+blur(8) + clip2(7, mask), "●")
-
- ass_main(ASS_BUF, SubL(_BT+_SK-5, _ET), an(5) + pos(_X-0.5, _Y-1.5) +alpha1(100)+color1("000000")+ bord(0)+blur(2.5), _TXT)
- ass_main(ASS_BUF, SubL(_BT+_SK-5, _BT+_SK+55), an(5) + pos(_X-0.5, _Y-1.5) +alpha1(255)+color3("FFFFFF")+ bord(1.5)+blur(7.5)+t(bord(0)), _TXT)
- POS = Bezier2(150, _X +500, _Y +randint(0,50), _X, _Y,_X+randint(250,350), _Y+randint(-50,-20))
- for i in range(150):
- ass_main(ASS_BUF, SubL(_BT+_SK-155+i*1, _BT+_SK-155+(i+1)*1,50), an(5)+blur(1.5) +color1("FFFFFF")+ pos(POS[i][0], POS[i][1])+fs(8), "●")
- for j in range(2):
- if randint(0,4) == 0:
- ass_main(ASS_BUF, SubL(_BT+_SK-155+i*1, _BT+_SK-155+(i+1)*1+30,50), an(7)+blur(0.3)+bord(0.2)+color3("FFFFFF") +color1("FFFFFF")+ mov(POS[exint(i-j*3-5)][0]+randint(-5,5), POS[exint(i-j*3-5)][1]+randint(-5,5),POS[exint(i-j*3-5)][0]+randint(-15,15), POS[exint(i-j*3-5)][1]+randint(-15,15))+fad(0,300)+fsc(60,60), pbri())
- ass_main(ASS_BUF, SubL(_BT, _ET), an(5) + pos(_X-0.5, _Y-1.5) +alpha1(255)+ bord(1)+blur(2.5)+fad(50,50), _TXT)
- return (ASS_BUF, TCS_BUF)
- def tcaxPy_Fin():
- FinFont(Font)
复制代码 |
-
1
查看全部评分
-
|