- UID
- 363
- 积分
- 2032
- 帖子
- 123
- 主题
- 18
- 论坛币
- 3812
- 威望
- 10
- EP值
- 1178
- MP值
- 0
- 阅读权限
- 80
- 注册时间
- 2012-3-21
- 在线时间
- 284 小时
- 最后登录
- 2017-1-31
|
- from tcaxPy import *
- from s import *
- from gdiFont import * #加入GDIfont模块
- import math
- import random
- def tcaxPy_Init():
- global _FontFileName
- global _FaceID
- global _Fs
- global _TextWidth
- global _TextHeight
- global _TextLength
- global _TextAdvDiff
- global _ResolutionX
- global _FD
- global _TextInitX
- global _Ascender # 字体上行高度
- global _Descender # 字体下行高度 通常为负数
- global _H
- _H = GetVal(val_FontSize)
- _FontFileName = GetVal(val_FontFileName)
- _FaceID = GetVal(val_FaceID)
- _Fs = GetVal(val_FontSize)
- _Ascender = GetVal(val_Ascender) #字体上行高度
- _TextHeight = GetVal(val_TextHeight)# 第i句卡拉OK歌词的j个字符的高度
- _TextWidth = GetVal(val_TextWidth)# 第i句卡拉OK歌词的j个字符的宽度
- _TextLength = GetVal(val_TextLength)# 第i句卡拉OK歌词的文字总长度
- _TextAdvDiff = GetVal(val_TextAdvanceDiff)# 从初始位置到第i句卡拉OK歌词的j个字符的水平步距
- _TextInitX = GetVal(val_TextInitX)
- _ResolutionX = GetVal(val_ResolutionX)
- _FD = 1000 / GetVal(val_FXFPS)
- global GdiFont #GDIfont
- GdiFont = gfInitFont(GetVal(val_FontFaceName), _Fs, GetVal(val_Spacing), GetVal(val_SpaceScale), 0, False) #GDIfont
- global Font
- Font = InitFont(GetVal(val_FontFileName), GetVal(val_FaceID), _Fs, GetVal(val_Spacing), GetVal(val_SpaceScale), 0xFFFFFF, 0, 0)
- def p(y):#绘图缩放代码
- if y == int(y):
- Y = str(int(y))
- else:
- Y = str(format(y, '.2f'))
- return '\\p{0}'.format(Y)
-
- def frxyz(x):
- X1 = randint(-x,x)
- X2 = randint(-x,x)
- X3 = randint(-x,x)
- return frx(X1)+fry(X2)+frz(X3)
-
- def tcaxPy_Main(_i, _j, _n, _BT, _ET, _SK, _KT, _X, _Y, _A, _TXT):
- ASS_BUF = [] # 用于保存ASS特效
- _7X = _X - int(_A / 2 + 0.5)
- _7Y = _Y - int(_H / 2 + 0.5)
-
- if _i == 0:
- ass_main(ASS_BUF,SubL(_BT-40+_j*3.4,_BT+_SK,1),an(5)+b(1)+bord(1)+be(10)+pos(_X,_Y)+fsc(200,200)+fad(400,0)+t(0,400,fsc(100,100)+be(1)+blur(6)) ,_TXT)#入场效果
- ass_main(ASS_BUF,SubL(_BT+_SK,_BT+_SK+_KT,1),an(5)+b(1)+bord(1)+blur(6)+org(_X,_Y)+move(_X+randint(-15,15),_Y+randint(-15,15),_X+randint(-15,15),_Y+randint(-15,15))+fsc(randint(80,130),randint(80,130))+t(frxyz(360)) ,_TXT)#表现方式
- ass_main(ASS_BUF,SubL(_BT+_SK+_KT,_BT+_SK+_KT+100,1),an(5)+b(1)+bord(0)+blur(6)+be(1)+org(_X,_Y)+move(_X+randint(-15,15),_Y+randint(-15,15),_X+randint(-15,15),_Y+randint(-15,15))+t(frxyz(720))+alpha(255) ,_TXT)#退场效果
- for j in range(0,60):
- ass_main(ASS_BUF,SubL(_BT+_SK,_BT+_SK+_KT,2),an(5)+bord(0)+fsc(randint(40,80),randint(40,80))+frxyz(720)+blur(8)+org(_X,_Y)+move(_X-j*2+randint(-15,15),_Y-j*2+randint(-15,15),_X+j*3+randint(-15,15),_Y-j+randint(-15,15))+alpha(j*(255/_Fs)) ,"{\p1}m 0 16 l 38 16 l 38 19 l 0 19 m 8 2 l 10 0 l 19 15 l 30 33 l 28 35 m 28 0 l 30 2 l 10 35 l 8 33 l 11 28 m 5 16 l 2 11 l 3 9 l 8 16 m 12 9 l 3 9 l 4 7 l 12 7 m 13 5 l 16 0 l 19 0 l 14 7 m 24 7 l 19 0 l 22 0 l 25 5 m 27 7 l 34 7 l 35 9 l 25 9 m 30 16 l 35 9 l 36 11 l 33 16 m 33 19 l 36 24 l 35 26 l 30 19 m 25 26 l 35 26 l 34 28 l 27 28 m 25 30 l 22 35 l 19 35 l 24 28 m 14 28 l 19 35 l 16 35 l 13 30 ")#附加效果
-
- if _i > 0 and _i <5:
- ass_main(ASS_BUF,SubL(_BT-40+_j*10,_BT+_SK,1),an(5)+bord(1)+b(1)+blur(10)+fad(1000,0)+move(_X-50,_Y-20,_X,_Y,0,400) ,_TXT)#入场效果
- BT = _BT+_SK
- ET = _BT+_SK+_KT
- ET2 = _ET
- EFT1 = alt(BT,ET, t=40,FX1 = fscy(60), FX2 = fscy(200), offset = 0, a1 = None,a2 = None)
- ass_main(ASS_BUF,SubL(_BT+_SK,_BT+_SK+_KT,1),an(5)+b(1)+blur(15)+fad(0,50)+pos(_X,_Y)+vc3("00BAFF","00BAFF","0090FF","0090FF")+bord(3)+t(rnd(10))+EFT1 ,_TXT)#表现方式1
- ass_main(ASS_BUF,SubL(_BT+_SK,_BT+_SK+_KT,1),an(5)+b(1)+blur(15)+fad(0,50)+pos(_X,_Y)+xbord(2)+t(rnd(10))+EFT1 ,_TXT)#表现方式2
- EFT2 = alt(BT,ET2, t=40,FX1 = fscy(100), FX2 = fscy(120), offset = 0, a1 = rnd(2),a2 = rnd(20))
- ass_main(ASS_BUF,SubL(_BT+_SK+_KT,_ET,1),an(5)+b(1)+bord(1)+blur(10)+vc3("00BAFF","00BAFF","0090FF","0090FF")+pos(_X,_Y)+EFT2 ,_TXT)#衔接
- ass_main(ASS_BUF,SubL(_ET,_ET+60,1),an(5)+b(1)+bord(1)+blur(10)+rnd(10)+move(_X,_Y,_X-randint(10,40),_Y+randint(30,80))+fad(0,700)+t(fsc(100,0)+frx(720)) ,_TXT)#退场效果
- for j in range(3):
- ass_main(ASS_BUF,SubL(_BT+_SK+1,_BT+_SK+_KT+10,2),an(5)+alpha(150)+org(_X,_Y)+fad(80,360)+be(8)+bord(1)+vc1("00BAFF","00BAFF","0090FF","0090FF")+blur(6)+shad(0)+fsc(5,5)+frz(360)+move(_X,_Y,_X-randint(-10,10),_Y-randint(-30,30))+t(200,1200,bord(2))+t(0,_KT*10,fsc(randint(50,120),randint(50,120))+rnd(80))+t(100,300,frz(45))+t(_KT*10,_KT*10+100,fsc(randint(50,100),randint(50,100))+frz(randint(-368,360))) ,"{\p2}m 38 -20 b 38 -20 38 -20 38 -20 b 38 -20 38 -17 38 -17 b 38 -17 38 -17 38 -17 b 84 74 38 61 38 104 l 38 101 l 38 40 l -20 40 l 96 40 b 58 40 61 -26 -20 40 b 14 55 49 74 84 88 b 70 77 52 64 38 52 b 61 74 40 55 18 40 b 23 40 32 40 38 40 b 18 40 58 40 96 40 b 18 40 38 40 96 40 b 6 37 55 40 93 40 b -3 101 55 40 38 40 l 38 40 b 38 40 38 40 38 40 b 38 40 38 40 38 40 b 38 40 38 40 38 40 b 38 40 38 40 38 40 b 38 40 38 40 38 40 b 20 55 6 74 -12 88 b 38 52 38 64 38 77 b 38 19 38 1 38 -20 b 38 -20 38 -17 38 -17 b -3 77 38 61 38 104 ")
-
- if _i > 4 and _i < 9 :
- ass_main(ASS_BUF,SubL(_BT+15*(_j-_n),_BT+_SK,1),an(5)+b(1)+blur(2)+org(_X,_Y+_Fs/2)+move(_X+15,_Y-15,_X,_Y,0,500)+bord(1)+alpha(255)+fsc(60,60)+t(0,800,0.6,frz(720)+fsc(100,100)+alpha3(0))+t(800,1000,alpha(00)) ,_TXT)#表现方式1
- ass_main(ASS_BUF,SubL(_BT+_SK,_BT+_SK+_KT+20,1),an(5)+b(1)+blur(8)+bord(6)+pos(_X,_Y)+fad(0,100)+t(0,_KT*3,fsc(130,130))+t(_KT*3,_KT*10,fsc(100,100)+bord(2.5)+blur(2)) ,_TXT)#表现方式
- ass_main(ASS_BUF,SubL(_BT+_SK-50,_BT+_SK+_KT,1),an(5)+blur(8)+fad(300,100)+move(_X+randint(-78,78),_Y+randint(-78,78),_X,_Y),"{\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")#附加效果1
- for j in range(3):
- BT=_BT+_SK
- ET=_BT+_SK+_KT+50
- ass_main(ASS_BUF,SubL(_BT+_SK,_BT+_SK+_KT+50,1),an(5)+blur(7)+fad(300,100)+move(_X,_Y,_X+randint(-120,120),_Y+randint(-120,120))+fsc(110,110)+alt(BT,ET, t = 50 , FX1 = alpha(255), FX2 = alpha(0), offset = 0, a1 = None,a2 = None),"{\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")#附加效果2
- if _i > 8 and _i < 16 :
- ass_main(ASS_BUF,SubL(_BT+_SK,_BT+_SK+_KT,1),an(5)+b(1)+pos(_X,_Y)+color("FFFFFF")+alpha3(100)+blur(10)+fsc(150,150)+rndy(80)+rndz(80)+rnd(10)+t(rndy(0)+rndz(0)+rnd(0)+fsc(100,100)+alpha3(0)+color3("000000")) ,_TXT)
- BT=_BT+_SK+_KT
- ET=_ET
- EFT1 = alt(BT,ET, t = 100 , FX1 = rnd(2), FX2 = rnd(0), offset = 0, a1 = rndy(2),a2 = rndy(0))
- EFT2 = alt(BT,ET, t = 100 , FX1 = rndz(2), FX2 = rndz(0), offset = 0, a1 =None,a2 = None )
- ass_main(ASS_BUF,SubL(_BT+_SK+_KT,_ET,1),an(5)+b(1)+blur(6)+org(_X-2000,_Y-500)+pos(_X,_Y)+EFT1+EFT2 ,_TXT)
- ass_main(ASS_BUF,SubL(_ET,_ET+_j*2,1),an(5)+b(1)+blur(6)+move(_X,_Y,_X-100,_Y-50)+t(frz(-90))+fad(0,100) ,_TXT)
- for j in range (5):
- ass_main(ASS_BUF,SubL(_BT+_SK,_BT+_SK+_KT+20,1),an(5)+pos(_X,_Y)+org(_X,_Y+_Fs/2)+bord(0.341111111)+fad(0,200)+blur(5)+alpha(230+j*1)+color3( FmtRGB(randint(200, 255), randint(200, 255), randint(200, 255)))+t(0,20*_KT,frx(90-j*10)+blur(4)) ,_TXT)
- ass_main(ASS_BUF,SubL(_BT+_SK,_BT+_SK+_KT+20,1),an(5)+pos(_X,_Y)+org(_X,_Y+_Fs/2)+bord(0.341111111)+fad(0,200)+blur(5)+alpha(230+j*1)+color3( FmtRGB(randint(200, 255), randint(200, 255), randint(200, 255)))+t(0,20*_KT,frx(90+j*10)+blur(4)) ,_TXT)
- ass_main(ASS_BUF,SubL(_BT+_SK,_BT+_SK+_KT+20,1),an(5)+pos(_X,_Y)+org(_X,_Y+_Fs/2)+bord(0.341111111)+fad(0,200)+blur(5)+alpha(230+j*1)+color3( FmtRGB(randint(200, 255), randint(200, 255), randint(200, 255)))+t(0,20*_KT,fry(90-j*10)+blur(4)) ,_TXT)
- ass_main(ASS_BUF,SubL(_BT+_SK,_BT+_SK+_KT+20,1),an(5)+pos(_X,_Y)+org(_X,_Y+_Fs/2)+bord(0.341111111)+fad(0,200)+blur(5)+alpha(230+j*1)+color3( FmtRGB(randint(200, 255), randint(200, 255), randint(200, 255)))+t(0,20*_KT,fry(90+j*10)+blur(4)) ,_TXT)
- ass_main(ASS_BUF,SubL(_BT+_SK,_BT+_SK+_KT+20,1),an(5)+pos(_X,_Y)+org(_X,_Y+_Fs/2)+bord(0.341111111)+fad(0,200)+blur(5)+alpha(230+j*1)+color3( FmtRGB(randint(200, 255), randint(200, 255), randint(200, 255)))+t(0,20*_KT,frz(90-j*10)+blur(4)) ,_TXT)
- ass_main(ASS_BUF,SubL(_BT+_SK,_BT+_SK+_KT+20,1),an(5)+pos(_X,_Y)+org(_X,_Y+_Fs/2)+bord(0.341111111)+fad(0,200)+blur(5)+alpha(230+j*1)+color3( FmtRGB(randint(200, 255), randint(200, 255), randint(200, 255)))+t(0,20*_KT,frz(90+j*10)+blur(4)) ,_TXT)
-
- if _i > 15 :
- ass_main(ASS_BUF,SubL(_BT-40+_j*2,_BT+_SK,1),an(5)+b(1)+pos(_X,_Y)+fad(200,0)+fsc(0,0)+t(0,200,fsc(220,220))+t(200,330,fsc(80,80))+t(330,520,fsc(140,140))+t(520,610,fsc(150,150))+t(610,710,fsc(120,120))+t(710,820,fsc(100,100))+rndy(20)+t(rndy(0))+blur(6) ,_TXT)
- BT=_BT+_SK
- ET=_BT+_SK+_KT
- EFT1 = alt(BT,ET, t = 40 , FX1 =frz(-1), FX2 = frz(1), offset = 0, a1 = None,a2 = None)
- EFT2 = alt(BT,ET, t = 40 , FX1 =frz(-1), FX2 = frz(1), offset = 0, a1 = color3("FFFFFF"),a2 = color3("060874"))
- ass_main(ASS_BUF,SubL(_BT+_SK,_BT+_SK+_KT,5),an(5)+b(1)+org(_X,_Y+300)+pos(_X,_Y)+fscy(150)+rndx(10)+blur(8)+t(rndx(0)+fscy(100))+EFT1 ,_TXT)
- ass_main(ASS_BUF,SubL(_BT+_SK,_BT+_SK+_KT,5),an(5)+b(1)+blur(8)+org(_X,_Y+300)+move(_X,_Y+5,_X,_Y-5)+fscy(150)+bord(4)+t(fscy(100))+alpha3(128)+EFT2 ,_TXT)
- ass_main(ASS_BUF,SubL(_BT+_SK+_KT,_ET,5),an(5)+b(1)+blur(6)+pos(_X,_Y) ,_TXT)
- ass_main(ASS_BUF,SubL(_ET,_ET+30,5),an(5)+b(1)+blur(3)+move(_X,_Y,_X+randint(-800,800),_Y+randint(-30,30))+fad(0,300)+bord(2)+t(frz(randint(-1280,1280))+fsc(randint(20,100),randint(20,100))) ,_TXT)
- for j in range(20):
- ass_main(ASS_BUF,SubL(_BT+_SK-10,_BT+_SK+_KT+50,1),an(5)+be(8)+fad(100,300)+blur(8)+move(_X,_Y,_X-randint(200,400),_Y-randint(-60,60))+fsc(30,30)+p(randint(2,3)) ,"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)
复制代码 预览:
http://pan.baidu.com/s/1veY1J
|
-
2
查看全部评分
-
|