- 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- from tcaxPy import *
- from util.tcCurve import *
- from util.cairo import *
- def tcaxPy_Init():
- global _Fs
- global _Spacing
- global Font
- global surface
- global ctx
- global M
- _Fs = GetVal(val_FontSize)
- _FontFileName = GetVal(val_FontFileName)
- _FaceID = GetVal(val_FaceID)
- _Spacing = GetVal(val_Spacing)
- Font = InitFont(_FontFileName, _FaceID, _Fs, _Spacing, GetVal(val_SpaceScale), MakeRGB(0, 0, 0), 0, False)
- fx_width = GetVal(val_ResolutionX)
- fx_height = GetVal(val_ResolutionY)
- surface = ImageSurface(FORMAT_ARGB32, fx_width, fx_height)
- ctx = Context(surface)
- ctx.select_font_face(GetVal(val_FontFaceName))
- ctx.set_font_size(CairoFontSize(_FontFileName, _FaceID, _Fs))
- def tcaxPy_Fin():
- FinFont(Font)
- def tcaxPy_Main(_I, _J, _N, _BT, _ET, _SK, _KT, _X, _Y, _A, _TXT):
- ASS_BUF = [] # used for saving ASS FX lines
- if _I == 7:
- _Y = _Y-50
- dx = _X - int((_A + _Spacing) / 2 + 0.5)
- dy = _Y - int(_Fs / 2 + 0.5)
- if _J == 0:
- ctx.new_path()
- ctx.move_to(dx,dy+ _Fs + GetVal(val_Descender))
- TXT = ""
- for j in range(_N):
- TXT += getTXT(_I,j)
- ctx.text_path(TXT)
- ctx.scale(1 / 64, 1 / 64)
- outline = ToAssDraw(ctx)
- ctx.scale(64, 64)
- END=_ET-int((getpos(_I,_N-1)[0]-getpos(_I,0)[0]+100)/3)-100
- for T in range(_BT-5,END ,int((getpos(_I,_N-1)[0]-getpos(_I,0)[0]+100)/3)+100):
- ass_main(ASS_BUF, SubL(T, T+(getpos(_I,_N-1)[0]-getpos(_I,0)[0]+100)/3,70), an(7) + mov(getpos(_I,0)[0]-50, _Y,getpos(_I,_N-1)[0]+50,_Y)+blur(3)+alpha1(30)+color1("FFFFFF")+bord(0)+shad(0)+clip(7,outline)+frz(-45) + fscx(70) ,"{\p1}m -15 -30 l 15 -30 15 30 -15 30")
- ass_main(ASS_BUF, SubL(T, T+(getpos(_I,_N-1)[0]-getpos(_I,0)[0]+100)/3,70), an(7) + mov(getpos(_I,_N-1)[0]+50, _Y,getpos(_I,0)[0]-50,_Y)+blur(3)+alpha1(30)+color1("FFFFFF")+bord(0)+shad(0)+clip(7,outline)+frz(-45) + fscx(70) ,"{\p1}m -15 -30 l 15 -30 15 30 -15 30")
- ass_main(ASS_BUF, SubL(T, T+(getpos(_I,_N-1)[0]-getpos(_I,0)[0]+100)/3,70), an(7) + mov(getpos(_I,0)[0]-50, _Y,getpos(_I,_N-1)[0]+50,_Y)+blur(3)+alpha1(30)+color1("FFFFFF")+bord(0)+shad(0)+clip(7,outline)+frz(-45) + fscx(70) ,"{\p1}m -15 -30 l 15 -30 15 30 -15 30")
- ass_main(ASS_BUF, SubL(T, T+(getpos(_I,_N-1)[0]-getpos(_I,0)[0]+100)/3,70), an(7) + mov(getpos(_I,_N-1)[0]+50, _Y,getpos(_I,0)[0]-50,_Y)+blur(3)+alpha1(30)+color1("FFFFFF")+bord(0)+shad(0)+clip(7,outline)+frz(-45) + fscx(70) ,"{\p1}m -15 -30 l 15 -30 15 30 -15 30")
-
- ass_main(ASS_BUF, SubL(_BT-30+_J*3,_ET+10+_J*3,49),fad(300,300)+pos(_X+1,_Y+1)+alpha1(120) + color1("000000") + blur(1) , _TXT)
- ass_main(ASS_BUF, SubL(_BT-30+_J*3,_ET+10+_J*3,50),fad(300,300)+pos(_X,_Y)+alpha1(0) + color1("FFFFFF"), _TXT)
- ass_main(ASS_BUF, SubL(_BT-30+_J*3,_ET+10+_J*3,51),fad(300,300)+pos(_X+2,_Y+2)+alpha1(35) + color1("1B1B1B")+ blur(1) , _TXT)
- ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT,60),pos(_X,_Y)+alpha1(255) + color1("FFFFFF")+bord(2)+blur(6), _TXT)
- for i in range(7):
- for j in range(_BT+_SK,_BT+_SK+_KT,3):
- ass_main(ASS_BUF, SubL(j,j+2,60),mov(_X,_Y,_X+randint(-1,1),_Y+randint(-1,1))+alpha1(170) + color1("FFFFFF")+bord(0)+blur(1), _TXT)
-
- global OPOS
- global XPOS
- if _J == 0 and _I == 0:
- OPOS = [(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0)]
- XPOS = [(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0)]
- if _I > 3 and _I!=7:
- for n in range(3):
- if _I == 4 and _J==0:
- OPOS[n] = (_X+randint(int(-_A/4*3),int(_A/4*3)),_Y+randint(-30,30))
- else:
- OPOS[n] = XPOS[n]
-
- for k in range(3):
- PP = [OPOS[k],OPOS[k],OPOS[k]]
- for x in range(_BT+_SK-5,_BT+_SK+_KT,20):
- XPOS[k] = (_X+randint(int(-_A/4*3),int(_A/4*3)),_Y+randint(-30,30))
- PP.append(XPOS[k])
- PP.append(XPOS[k])
- PP.append(XPOS[k])
- ucb = UCBSpline(PP)
-
- STEP_N = _KT
-
- step_size = 1 / STEP_N
- POS = []
-
- for u in range(STEP_N):
- POS.append(ucb(u * step_size))
- s = "●"
- for w in range(STEP_N):
-
- for j in range(7):
- rand1 = (POS[w][0],POS[w][1])
- rand2 = RandCir2(POS[w][0],POS[w][1],8,15)
- ass_main(ASS_BUF, SubL(_BT+_SK-5+w*1, _BT+_SK-5+16+(w+1)*1,30), alpha3(randint(80,120))+fs(1)+an(5)+xbord(0.1*randint(60,80))+ybord(0.1*randint(60,80))+blur(10)+shad(0)+mov(rand1[0], rand1[1],rand2[0], rand2[1]) +t(fsc(0,0)+xbord(0)+ybord(0))+fad(50,300)+color1('0000EE')+color3('0000EE'), s )
- ass_main(ASS_BUF, SubL(_BT+_SK-5+w*1, _BT+_SK-5+16+(w+1)*1,32), alpha3(randint(30,70))+fs(1)+an(5)+xbord(0.1*randint(40,60))+ybord(0.1*randint(40,60))+blur(6)+shad(0)+mov(rand1[0], rand1[1],rand2[0], rand2[1]) +t(fsc(0,0)+xbord(0)+ybord(0))+fad(50,300)+color1('0080FF')+color3('0080FF'), s )
- ass_main(ASS_BUF, SubL(_BT+_SK-5+w*1, _BT+_SK-5+16+(w+1)*1,35), alpha3(randint(0,50))+fs(1)+an(5)+xbord(0.1*randint(20,35))+ybord(0.1*randint(20,35))+blur(3)+shad(0)+ mov(rand1[0], rand1[1],rand2[0], rand2[1]) +t(fsc(0,0)+xbord(0)+ybord(0))+fad(50,300)+color1('FFFFFF')+color3('FFFFFF'), s )
- for i in range(randint(0,2)):
- C3 = DivClr('0080FF', '0000EE', 20)[randint(0, 19)]
- rand1 = RandCir(POS[w][0],POS[w][1],10)
- rand2 = RandCir2(POS[w][0],POS[w][1],20,40)
- x = RandPolygon(12/8, 12/8, 4)
- ass_main(ASS_BUF, SubL(_BT+_SK-5+w*1, _BT+_SK-5+60+(w+1)*1,35), alpha(80)+an(5)+t(fry(720))+color3(C3)+bord(1.8)+shad(0)+blur(2)+ mov(rand1[0], rand1[1],rand2[0], rand2[1]) +fad(50,500),x )
-
- c = DivClr('C0C0C0', '4F4F4F', 40)[randint(0, 39)]
- ox = randint(-10, 10)
- ass_main(ASS_BUF, SubL(_BT+_SK-5+w*1, _BT+_SK-5+100+(w+1)*1,15), an(5) + xbord(randint(4, 8)) + ybord(randint(4, 8)) + blur(8) + alpha(randint(100, 200)) + shad(0) + t(xbord(randint(1, 4)) + ybord(randint(1, 4)) ) +fs(1)+fad(50,500)+color1(c) + color3(c)+mov(POS[w][0] + ox,POS[w][1] + randint(0, 10),POS[w][0] + ox,POS[w][1]+ randint(-20, 0)),"●" )
- return (ASS_BUF, None)
复制代码 |
-
2
查看全部评分
-
|