- UID
- 363
- 积分
- 2032
- 帖子
- 123
- 主题
- 18
- 论坛币
- 3812
- 威望
- 10
- EP值
- 1178
- MP值
- 0
- 阅读权限
- 80
- 注册时间
- 2012-3-21
- 在线时间
- 284 小时
- 最后登录
- 2017-1-31
|
本帖最后由 jijidata 于 2014-11-2 01:13 编辑
很长,但好多都是重复的,就改了个颜色代码...
日文:- from tcaxPy import *
- from s import *
- from util.gdiFont import * #加入GDIfont模块
- from util.tcCurve import *
- import math
- import random
- from util.cairo import *
- 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
- global _3C
- global _KarTime
- _KarTime = GetVal(val_KarTime)# 第i句卡拉OK歌词的第j个字符的Karaoke时间 = !$start!
- _H = GetVal(val_FontSize)
- _3C = GetVal(val_3C)
- _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)
-
- global ctx
- fx_width = GetVal(val_ResolutionX)
- fx_height = GetVal(val_ResolutionY)
- surface = ImageSurface(FORMAT_ARGB32, fx_width, fx_height)
- ctx = Context(surface)
- 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 x_filter(x, y, param):
- _A, dx, dy, frame_pct = param
- max_diff_x = randint(-1* 8,1* 8)
- max_diff_y = randint(-1* 8,1* 8)
- p = 1+0.5*(1-frame_pct)
- new_x = floor(x*p-_A*4*(p-1) + max_diff_x)
- new_y = floor(y*p-_Fs*4*(p-1) + max_diff_y)
- return new_x, new_y
-
- class Randnon_rep : #生成不重复随机整数
- def __init__(self):
- self.num = []
-
- def randnum(self,n,m) :
- data = random.randint(n,m)
- while True:
- if len(self.num) < (m-n+1) :
- if data not in self.num:
- self.num.append(data)
- return data
- else :
- data = random.randint(n,m)
- else :
- self.num = []
- rdm = Randnon_rep()
- colour = ["B4942F","614EB6","EAAA95","9A401E","7B9E41","41C9A4","3E9EF2","7F3147","786E34"]
- shape = ["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 ","m 6 0 b 12 0 12 7 6 7 b 0 7 0 0 6 0 ","m 15 0 l 10 7 l 0 9 l 9 13 l 5 23 l 15 17 l 25 23 l 21 13 l 31 9 l 20 7 l 15 0 "]
- def tcaxPy_Main(_i, _j, _n, _BT, _ET, _SK, _KT, _X, _Y, _A, _TXT):
- ASS_BUF = [] # 用于保存ASS特效
- _7X = _X - int((_A + GetVal(val_Spacing)) / 2 + 0.5) #每个字的上X坐标= !$left!
- _7Y = _Y - int(_Fs / 2 + 0.5) #每个字的上Y坐标=!$top!
- _bottom = _Y + int(_H / 2 + 0.5) #每个字的下Y坐标
- if (_i > -1 and _i <4) :
- ass_main(ASS_BUF, SubL(_BT-25+rdm.randnum(-5,25),_BT),pos(_X, _Y)+blur(2)+color3(colour[0]), _TXT)
- ass_main(ASS_BUF, SubL(_BT,_BT+_SK-5),an(5)+pos(_X, _Y)+blur(2)+color3(colour[0]), _TXT)
-
- frames = int((_KT+2)*10 / _FD + 0.5)
- for i in range(frames):
- ts = _BT+_SK-5 + i * _FD / 10
- te = _BT+_SK-5 + (i + 1) * _FD / 10
- frame_pct = i / frames
- outline = gfGetOutline(GdiFont, _TXT, 0, 0)
- AssDraw(ctx, outline)
- path_trans(ctx, x_filter,(_A,_X,_Y,frame_pct))
- text = ToAssDraw(ctx)
- EFT = an(7) + pos(_7X,_7Y) +bord(1.5)+blur(3)+color3(colour[0])+color4(colour[0])+ p(4)
- ass_main(ASS_BUF, SubL(ts, te,20), EFT, text)
- for j in range(math.ceil(_KT)): #粒子轨迹
- J = [math.ceil(_KT)]
- step1 = _KT*10*(j-1)/(max(J)*10-1)
- XC1= _7X+_A*(j+1)/max(J) #X的实际坐标,从每个字的左边移动到右边(这是spacing为0的情况下,spacing不为0需修改代码,嗯~我偷懒了)
- _SY = _Y - int(_H / 2 + 0.5)*(-1)**_j #Y坐标初始坐标,依次为每个字的上顶点,下顶点,
- _CY = (-1)**_j*_H*(j+1)/max(J) #Y坐标的控制参数,含义为依次加上字符的高度,减去字符的高度
- YC1= _SY+_CY #Y坐标的实际坐标,由以上初始坐标加上控制参数生成
- XC2= XC1-_A*0.1*randint(10,40)
- YC2= YC1+random.uniform(-0.4*_A,0.4*_A)
- CurveMove = move(XC1,YC1,XC2,YC2)
- ass_main(ASS_BUF,SubL(_BT+_SK+step1,_BT+_SK+_KT+step1+70,2),an(5)+color3(colour[0])+blur(4)+bord(0.5)+fad(0,300)+t(frxyz(720))+CurveMove+p(1)+fsc(randint(20,40),randint(20,40)),shape[randint(0,2)])
-
- ass_main(ASS_BUF,SubL(_BT+_SK+_KT-5,_ET,2),an(5)+pos(_X,_Y)+blur(2)+color3(colour[0]) ,_TXT)
- ass_main(ASS_BUF,SubL(_ET,_ET+10+rdm.randnum(-5,10),2),an(5)+pos(_X,_Y)+blur(2)+color3(colour[0]) ,_TXT)
- elif (_i > 3 and _i <6) :
- ass_main(ASS_BUF, SubL(_BT-25+rdm.randnum(-5,25),_BT),pos(_X, _Y)+blur(2)+color3(colour[1]), _TXT)
- ass_main(ASS_BUF, SubL(_BT,_BT+_SK-5),an(5)+pos(_X, _Y)+blur(2)+color3(colour[1]), _TXT)
-
- frames = int((_KT+2)*10 / _FD + 0.5)
- for i in range(frames):
- ts = _BT+_SK-5 + i * _FD / 10
- te = _BT+_SK-5 + (i + 1) * _FD / 10
- frame_pct = i / frames
- outline = gfGetOutline(GdiFont, _TXT, 0, 0)
- AssDraw(ctx, outline)
- path_trans(ctx, x_filter,(_A,_X,_Y,frame_pct))
- text = ToAssDraw(ctx)
- EFT = an(7) + pos(_7X,_7Y) +bord(1.5)+blur(3)+color3(colour[1])+color4(colour[1])+ p(4)
- ass_main(ASS_BUF, SubL(ts, te,20), EFT, text)
-
- for j in range(math.ceil(_KT)): #粒子轨迹
- J = [math.ceil(_KT)]
- step1 = _KT*10*(j-1)/(max(J)*10-1)
- XC1= _7X+_A*(j+1)/max(J) #X的实际坐标,从每个字的左边移动到右边(这是spacing为0的情况下,spacing不为0需修改代码,嗯~我偷懒了)
- _SY = _Y - int(_H / 2 + 0.5)*(-1)**_j #Y坐标初始坐标,依次为每个字的上顶点,下顶点,
- _CY = (-1)**_j*_H*(j+1)/max(J) #Y坐标的控制参数,含义为依次加上字符的高度,减去字符的高度
- YC1= _SY+_CY #Y坐标的实际坐标,由以上初始坐标加上控制参数生成
- XC2= XC1-_A*0.1*randint(10,40)
- YC2= YC1+random.uniform(-0.4*_A,0.4*_A)
- CurveMove = move(XC1,YC1,XC2,YC2)
- ass_main(ASS_BUF,SubL(_BT+_SK+step1,_BT+_SK+_KT+step1+70,2),an(5)+color3(colour[1])+blur(4)+bord(0.5)+fad(0,300)+t(frxyz(720))+CurveMove+p(1)+fsc(randint(20,40),randint(20,40)),shape[randint(0,2)])
-
-
- ass_main(ASS_BUF,SubL(_BT+_SK+_KT-5,_ET,2),an(5)+pos(_X,_Y)+blur(2)+color3(colour[1]) ,_TXT)
- ass_main(ASS_BUF,SubL(_ET,_ET+10+rdm.randnum(-5,10),2),an(5)+pos(_X,_Y)+blur(2)+color3(colour[1]) ,_TXT)
- elif (_i > 5 and _i <8) :
- ass_main(ASS_BUF, SubL(_BT-25+rdm.randnum(-5,25),_BT),pos(_X, _Y)+blur(2)+color3(colour[2]), _TXT)
- ass_main(ASS_BUF, SubL(_BT,_BT+_SK-5),an(5)+pos(_X, _Y)+blur(2)+color3(colour[2]), _TXT)
-
- frames = int((_KT+2)*10 / _FD + 0.5)
- for i in range(frames):
- ts = _BT+_SK-5 + i * _FD / 10
- te = _BT+_SK-5 + (i + 1) * _FD / 10
- frame_pct = i / frames
- outline = gfGetOutline(GdiFont, _TXT, 0, 0)
- AssDraw(ctx, outline)
- path_trans(ctx, x_filter,(_A,_X,_Y,frame_pct))
- text = ToAssDraw(ctx)
- EFT = an(7) + pos(_7X,_7Y) +bord(1.5)+blur(3)+color3(colour[2]) + p(4)
- ass_main(ASS_BUF, SubL(ts, te,20), EFT, text)
-
- for j in range(math.ceil(_KT)): #粒子轨迹
- J = [math.ceil(_KT)]
- step1 = _KT*10*(j-1)/(max(J)*10-1)
- XC1= _7X+_A*(j+1)/max(J) #X的实际坐标,从每个字的左边移动到右边(这是spacing为0的情况下,spacing不为0需修改代码,嗯~我偷懒了)
- _SY = _Y - int(_H / 2 + 0.5)*(-1)**_j #Y坐标初始坐标,依次为每个字的上顶点,下顶点,
- _CY = (-1)**_j*_H*(j+1)/max(J) #Y坐标的控制参数,含义为依次加上字符的高度,减去字符的高度
- YC1= _SY+_CY #Y坐标的实际坐标,由以上初始坐标加上控制参数生成
- XC2= XC1-_A*0.1*randint(10,40)
- YC2= YC1+random.uniform(-0.4*_A,0.4*_A)
- CurveMove = move(XC1,YC1,XC2,YC2)
- ass_main(ASS_BUF,SubL(_BT+_SK+step1,_BT+_SK+_KT+step1+70,2),an(5)+color3(colour[2])+blur(4)+bord(0.5)+fad(0,300)+t(frxyz(720))+CurveMove+p(1)+fsc(randint(20,40),randint(20,40)),shape[randint(0,2)])
-
- ass_main(ASS_BUF,SubL(_BT+_SK+_KT-5,_ET,2),an(5)+pos(_X,_Y)+blur(2)+color3(colour[2]) ,_TXT)
- ass_main(ASS_BUF,SubL(_ET,_ET+10+rdm.randnum(-5,10),2),an(5)+pos(_X,_Y)+blur(2)+color3(colour[2]) ,_TXT)
-
- elif (_i > 7 and _i < 10 ) :
- if _j < 0.1*_n*randint(3,8) :
- ass_main(ASS_BUF, SubL(_BT-40,_BT-20),move(_X+200, _Y-200,_X+19,_Y-19)+fsc(0,0)+t(fsc(90,90))+fad(100,0)+blur(2)+color3(colour[3]), _TXT)
- ass_main(ASS_BUF, SubL(_BT-20,_BT),move(_X+19,_Y-19,_X,_Y)+fsc(90,90)+t(fsc(100,100))+fad(100,0)+blur(2)+color3(colour[3]), _TXT)
- else :
- ass_main(ASS_BUF, SubL(_BT-30,_BT-10),move(_X+200, _Y-200,_X+19,_Y-19)+fsc(0,0)+t(fsc(90,90))+fad(100,0)+blur(2)+color3(colour[3]), _TXT)
- ass_main(ASS_BUF, SubL(_BT-10,_BT),move(_X+19,_Y-19,_X,_Y)+fsc(90,90)+t(fsc(100,100))+fad(100,0)+blur(2)+color3(colour[3]), _TXT)
- ass_main(ASS_BUF, SubL(_BT,_BT+_SK+5),an(5)+pos(_X, _Y)+blur(2)+color3(colour[3])+fad(0,80), _TXT)
-
- outline = TextOutlinePoints(Font, _TXT, 1.0) #表现方法
- outnline = TextOutlinePoints(_FontFileName, _FaceID, 45, _TXT, 1.0)
- num = len(outline)
- for i in range(num):
- ts = _BT + _SK +int(i/num*_KT)
- te = _BT + _SK +int(i/num*_KT)+50
- x = _7X + outline[i][0]
- y = _7Y + outline[i][1]
- x1 = _7X + outnline[i][0]
- y1 = _7Y + outnline[i][1]-5
- EFT = move(x, y, x1, y1)+alpha1(0)+alpha3(0)+bord(1)+blur(2)+shad(0)+color3(colour[3])+color1(colour[3])+fad(0, 300)
- ass_main(ASS_BUF, SubL(ts, te, 3, Pix_Style), EFT, PixPt())
-
- ass_main(ASS_BUF,SubL(_BT+_SK+49,_ET,2),an(5)+pos(_X, _Y)+fad(100,0)+blur(2)+color3(colour[3]) ,_TXT)
- ass_main(ASS_BUF,SubL(_ET,_ET+30,2),an(5)+org(0,0)+t(frz(rdm.randnum(-6,6))+fsc(0,0)+alpha3(0)+color1(colour[3]))+move(_X,_Y,_X+randint(-400,400),_Y+randint(-400,100))+fad(0,120)+color3(colour[3]) ,_TXT)
-
- elif _i == 10 or _i == 11:
- ass_main(ASS_BUF, SubL(_BT-30,_BT+10),an(5)+pos(_X, _Y)+blur(15)+alpha3(255)+be(15)+color3(colour[4])+bord(0)+fsc(160,160)+t(0,300,fsc(100,100)+blur(2)+be(1))+t(200,300,bord(2)+alpha(100)), _TXT)
- ass_main(ASS_BUF, SubL(_BT+10,_BT+_SK+5),an(5)+pos(_X, _Y)+blur(2)+t(0,100,color3(colour[3]))+fad(0,80), _TXT)
-
- outline = TextOutlinePoints(Font, _TXT, 1.0) #表现方法
- outnline = TextOutlinePoints(_FontFileName, _FaceID, 45, _TXT, 1.0)
- num = len(outline)
- for i in range(num):
- ts = _BT + _SK +int(i/num*_KT)
- te = _BT + _SK +int(i/num*_KT)+50
- x = _7X + outline[i][0]
- y = _7Y + outline[i][1]
- x1 = _7X + outnline[i][0]
- y1 = _7Y + outnline[i][1]-5
- EFT = move(x, y, x1, y1)+alpha1(0)+alpha3(0)+bord(1)+blur(2)+shad(0)+color3(colour[3])+color1(colour[3])+fad(0, 300)
- ass_main(ASS_BUF, SubL(ts, te, 3, Pix_Style), EFT, PixPt())
-
- ass_main(ASS_BUF,SubL(_BT+_SK+49,_ET,2),an(5)+pos(_X, _Y)+fad(100,0)+blur(2)+color3(colour[3]) ,_TXT)
- ass_main(ASS_BUF, SubL(_ET,_ET+30),an(5)+pos(_X, _Y)+t(0,50,bord(0)+alpha3(255))+t(30,300,fsc(160,160)+blur(15)+be(15)), _TXT)
-
- elif _i == 12:
- ass_main(ASS_BUF, SubL(_BT-30,_BT+10),an(5)+pos(_X, _Y)+blur(15)+alpha3(255)+be(15)+color3(colour[4])+bord(0)+fsc(160,160)+t(0,300,fsc(100,100)+blur(2)+be(1))+t(200,300,bord(2)+alpha(100)), _TXT)
- ass_main(ASS_BUF, SubL(_BT+10,_BT+_SK+5),an(5)+pos(_X, _Y)+blur(2)+t(0,100,color3(colour[5]))+fad(0,80), _TXT)
-
- outline = TextOutlinePoints(Font, _TXT, 1.0) #表现方法
- outnline = TextOutlinePoints(_FontFileName, _FaceID, 45, _TXT, 1.0)
- num = len(outline)
- for i in range(num):
- ts = _BT + _SK +int(i/num*_KT)
- te = _BT + _SK +int(i/num*_KT)+50
- x = _7X + outline[i][0]
- y = _7Y + outline[i][1]
- x1 = _7X + outnline[i][0]
- y1 = _7Y + outnline[i][1]-5
- EFT = move(x, y, x1, y1)+alpha1(0)+alpha3(0)+bord(1)+blur(2)+shad(0)+color3(colour[5])+color1(colour[5])+fad(0, 300)
- ass_main(ASS_BUF, SubL(ts, te, 3, Pix_Style), EFT, PixPt())
-
- ass_main(ASS_BUF,SubL(_BT+_SK+49,_ET,2),an(5)+pos(_X, _Y)+fad(100,0)+blur(2)+color3(colour[5]) ,_TXT)
- for s in range(5):
- ass_main(ASS_BUF, SubL(_BT+randint(-30,50),_ET+randint(100,150),2),an(5)+color3(colour[5])+fad(300,500)+blur(6)+fsc(randint(5,50),randint(5,50))+moves4(_X+randint(-90,70),_Y+randint(-80,60),_X+randint(-60,60),_Y+randint(-40,70),_X+randint(-60,60),_Y+randint(-40,68),_X+randint(-50,50),_Y+randint(-60,60)),"{\\p2}m 21 16 b 17 16 17 23 21 23 b 25 23 26 16 21 16 m 24 19 l 43 20 l 24 20 m 18 19 l 0 20 l 18 20 m 20 16 l 21 0 l 22 16 m 20 23 l 21 40 l 22 23 ")
-
- ass_main(ASS_BUF, SubL(_ET,_ET+30+rdm.randnum(-20,15)),an(5)+blur(2)+color3(colour[5])+move(_X, _Y,_X, _Y-randint(650,720))+t(alpha(255)), _TXT)
-
- elif _i == 13:
- ass_main(ASS_BUF, SubL(_BT-30,_BT+10),an(5)+pos(_X, _Y)+blur(15)+alpha3(255)+be(15)+color3(colour[5])+bord(0)+fsc(160,160)+t(0,300,fsc(100,100)+blur(2)+be(1))+t(200,300,bord(2)+alpha(100)), _TXT)
- ass_main(ASS_BUF, SubL(_BT+10,_BT+_SK+5),an(5)+pos(_X, _Y)+blur(2)+t(0,100,color3(colour[6]))+fad(0,80), _TXT)
-
- outline = TextOutlinePoints(Font, _TXT, 1.0) #表现方法
- outnline = TextOutlinePoints(_FontFileName, _FaceID, 45, _TXT, 1.0)
- num = len(outline)
- for i in range(num):
- ts = _BT + _SK +int(i/num*_KT)
- te = _BT + _SK +int(i/num*_KT)+50
- x = _7X + outline[i][0]
- y = _7Y + outline[i][1]
- x1 = _7X + outnline[i][0]
- y1 = _7Y + outnline[i][1]-5
- EFT = move(x, y, x1, y1)+alpha1(0)+alpha3(0)+bord(1)+blur(2)+shad(0)+color3(colour[6])+color1(colour[6])+fad(0, 300)
- ass_main(ASS_BUF, SubL(ts, te, 3, Pix_Style), EFT, PixPt())
-
- ass_main(ASS_BUF,SubL(_BT+_SK+_KT-10,_ET,2),an(5)+pos(_X, _Y)+fad(100,0)+blur(2)+color3(colour[6]) ,_TXT)
-
- for s in range(5):
- ass_main(ASS_BUF, SubL(_BT+randint(-30,50),_ET+randint(100,150),2),an(5)+color3(colour[6])+fad(300,500)+blur(6)+fsc(randint(5,50),randint(5,50))+moves4(_X+randint(-90,70),_Y+randint(-80,60),_X+randint(-60,60),_Y+randint(-40,70),_X+randint(-60,60),_Y+randint(-40,68),_X+randint(-50,50),_Y+randint(-60,60)),"{\\p2}m 21 16 b 17 16 17 23 21 23 b 25 23 26 16 21 16 m 24 19 l 43 20 l 24 20 m 18 19 l 0 20 l 18 20 m 20 16 l 21 0 l 22 16 m 20 23 l 21 40 l 22 23 ")
-
- ass_main(ASS_BUF, SubL(_ET,_ET+30+rdm.randnum(-20,15)),an(5)+blur(2)+color3(colour[6])+move(_X, _Y,_X, _Y-randint(650,720))+t(alpha(255)), _TXT)
-
- elif _i ==14 :
- ass_main(ASS_BUF, SubL(_BT-30,_BT+10),an(5)+pos(_X, _Y)+blur(15)+alpha3(255)+be(15)+color3(colour[6])+bord(0)+fsc(160,160)+t(0,300,fsc(100,100)+blur(2)+be(1))+t(200,300,bord(2)+alpha(100)), _TXT)
- ass_main(ASS_BUF, SubL(_BT+10,_BT+_SK),an(5)+pos(_X, _Y)+blur(2)+t(0,100,color3(colour[6]))+fad(0,80), _TXT)
- ass_main(ASS_BUF,SubL(_BT+_SK,_BT+_SK+_KT,1),an(2)+pos(_X,_bottom)+color3(colour[6])+t(0,_KT*10/4.5,0.65,fscy(120)+bord(2)+blur(7))+t(_KT*10/2.5,_KT*10,1.35,fscy(100)+blur(2)+bord(1)) ,_TXT)
- ass_main(ASS_BUF,SubL(_BT+_SK+_KT,_ET,2),an(5)+pos(_X, _Y)+blur(2)+color3(colour[6]) ,_TXT)
- ass_main(ASS_BUF, SubL(_ET,_ET+30),an(5)+pos(_X, _Y)+t(0,50,bord(0)+alpha3(255))+t(30,300,fsc(160,160)+blur(15)+be(15)), _TXT)
-
- for j in range(10):
- ass_main(ASS_BUF,SubL(_BT+_SK+j,_BT+_SK+_KT+j*5+randint(25,75),2),an(5)+fad(20,50)+color1("FFFFFF")+color3("DC76FF")+bord(randint(1,15)*0.1)+blur(randint(5,20)*0.1)+fsc(randint(3,8),randint(3,8))+move(_X+randint(-5,5),_Y+randint(-50,-10),_X+randint(-50,50),_Y+randint(-5,25)) ,"{\p1}m 0 -2 l -3 1 l -1 3 l 1 3 l 3 1 l 0 -2")
- ass_main(ASS_BUF,SubL(_BT+_SK+j,_BT+_SK+_KT+j*5+randint(25,75),2),an(5)+fad(20,50)+color1("FFFFFF")+color3("DC76FF")+bord(randint(1,15)*0.1)+blur(randint(5,20)*0.1)+fsc(randint(3,8),randint(3,8))+move(_X+randint(-5,5),_7Y+randint(-50,-10),_X+randint(-50,50),_7Y+randint(-15,15)) ,"{\p1}m 0 -2 l -3 1 l -1 3 l 1 3 l 3 1 l 0 -2")
- ass_main(ASS_BUF,SubL(_BT+_SK+j,_BT+_SK+_KT+j*5+randint(25,75),2),an(5)+fad(20,50)+color1("FFFFFF")+color3("DC76FF")+bord(randint(1,15)*0.1)+blur(randint(5,20)*0.1)+fsc(randint(3,8),randint(3,8))+move(_X+randint(-5,5),_bottom+randint(-5,5),_X+randint(-50,50),_bottom+randint(-5,100)) ,"{\p1}m 0 -2 l -3 1 l -1 3 l 1 3 l 3 1 l 0 -2")
- for k in range(3):
- EFT = alt(_BT+_SK+k,_BT+_SK+_KT+k*5+randint(25,75), t = randint(60,100) , FX1 = alpha(255)+fsc(randint(5,10),randint(5,10)), FX2 = alpha(0)+fsc(randint(10,20),randint(10,20)), offset = 0, a1 = None,a2 = None)
- ass_main(ASS_BUF,SubL(_BT+_SK+k,_BT+_SK+_KT+k*5+randint(25,75),2),an(5)+fad(20,50)+color1("FFFFFF")+color3("DC76FF")+bord(0.4)+blur(4)+fsc(5,5)+move(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-40,40),_Y+randint(-5,85))+EFT ,"{\p1}m 46 54 l 1 56 l 46 57 b 46 58 47 60 47 60 b 42 66 37 72 32 77 b 38 72 43 67 49 62 b 49 63 51 64 52 64 b 53 79 53 93 54 107 b 54 93 55 79 56 64 b 56 65 58 63 59 62 l 76 78 l 60 61 b 61 60 61 57 61 57 l 106 56 l 61 54 b 61 54 60 51 60 51 l 75 35 l 59 49 b 58 48 57 47 55 47 l 54 1 l 52 47 b 50 47 49 48 49 49 l 32 34 l 47 51 b 47 52 46 53 46 54")
- ass_main(ASS_BUF,SubL(_BT+_SK+k,_BT+_SK+_KT+k*5+randint(25,75),2),an(5)+fad(20,50)+color1("FFFFFF")+color3("DC76FF")+bord(0.4)+blur(4)+fsc(5,5)+move(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-40,40),_Y+randint(-105,5))+EFT ,"{\p1}m 46 54 l 1 56 l 46 57 b 46 58 47 60 47 60 b 42 66 37 72 32 77 b 38 72 43 67 49 62 b 49 63 51 64 52 64 b 53 79 53 93 54 107 b 54 93 55 79 56 64 b 56 65 58 63 59 62 l 76 78 l 60 61 b 61 60 61 57 61 57 l 106 56 l 61 54 b 61 54 60 51 60 51 l 75 35 l 59 49 b 58 48 57 47 55 47 l 54 1 l 52 47 b 50 47 49 48 49 49 l 32 34 l 47 51 b 47 52 46 53 46 54")
- ass_main(ASS_BUF,SubL(_BT+_SK+k,_BT+_SK+_KT+k*5+randint(25,75),2),an(5)+fad(20,50)+color1("FFFFFF")+color3("DC76FF")+bord(0.5)+blur(4)+fsc(5,5)+move(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-40,40),_Y+randint(-5,85))+EFT ,"{\p1}m 46 54 l 1 56 l 46 57 b 46 58 47 60 47 60 b 42 66 37 72 32 77 b 38 72 43 67 49 62 b 49 63 51 64 52 64 b 53 79 53 93 54 107 b 54 93 55 79 56 64 b 56 65 58 63 59 62 l 76 78 l 60 61 b 61 60 61 57 61 57 l 106 56 l 61 54 b 61 54 60 51 60 51 l 75 35 l 59 49 b 58 48 57 47 55 47 l 54 1 l 52 47 b 50 47 49 48 49 49 l 32 34 l 47 51 b 47 52 46 53 46 54")
-
- else :
- ass_main(ASS_BUF, SubL(_BT-30,_BT+10),an(5)+pos(_X, _Y)+blur(15)+alpha3(255)+be(15)+color3(colour[8])+bord(0)+fsc(160,160)+t(0,300,fsc(100,100)+blur(2)+be(1))+t(200,300,bord(2)+alpha(100)), _TXT)
- ass_main(ASS_BUF, SubL(_BT+10,_BT+_SK),an(5)+pos(_X, _Y)+blur(2)+t(0,100,color3(colour[8]))+fad(0,80), _TXT)
- ass_main(ASS_BUF,SubL(_BT+_SK,_BT+_SK+_KT,1),an(2)+pos(_X,_bottom)+color3(colour[8])+t(0,_KT*10/4.5,0.65,fscy(120)+bord(2)+blur(7))+t(_KT*10/2.5,_KT*10,1.35,fscy(100)+blur(2)+bord(1)) ,_TXT)
- ass_main(ASS_BUF,SubL(_BT+_SK+_KT,_ET,2),an(5)+pos(_X, _Y)+blur(2)+color3(colour[8]) ,_TXT)
- ass_main(ASS_BUF, SubL(_ET,_ET+30),an(5)+pos(_X, _Y)+t(0,50,bord(0)+alpha3(255))+t(30,300,fsc(160,160)+blur(15)+be(15)), _TXT)
-
- for j in range(10):
- ass_main(ASS_BUF,SubL(_BT+_SK+j,_BT+_SK+_KT+j*5+randint(25,75),2),an(5)+fad(20,50)+color1("FFFFFF")+color3("DC76FF")+bord(randint(1,15)*0.1)+blur(randint(5,20)*0.1)+fsc(randint(3,8),randint(3,8))+move(_X+randint(-5,5),_Y+randint(-50,-10),_X+randint(-50,50),_Y+randint(-5,25)) ,"{\p1}m 0 -2 l -3 1 l -1 3 l 1 3 l 3 1 l 0 -2")
- ass_main(ASS_BUF,SubL(_BT+_SK+j,_BT+_SK+_KT+j*5+randint(25,75),2),an(5)+fad(20,50)+color1("FFFFFF")+color3("DC76FF")+bord(randint(1,15)*0.1)+blur(randint(5,20)*0.1)+fsc(randint(3,8),randint(3,8))+move(_X+randint(-5,5),_7Y+randint(-50,-10),_X+randint(-50,50),_7Y+randint(-15,15)) ,"{\p1}m 0 -2 l -3 1 l -1 3 l 1 3 l 3 1 l 0 -2")
- ass_main(ASS_BUF,SubL(_BT+_SK+j,_BT+_SK+_KT+j*5+randint(25,75),2),an(5)+fad(20,50)+color1("FFFFFF")+color3("DC76FF")+bord(randint(1,15)*0.1)+blur(randint(5,20)*0.1)+fsc(randint(3,8),randint(3,8))+move(_X+randint(-5,5),_bottom+randint(-5,5),_X+randint(-50,50),_bottom+randint(-5,100)) ,"{\p1}m 0 -2 l -3 1 l -1 3 l 1 3 l 3 1 l 0 -2")
- for k in range(3):
- EFT = alt(_BT+_SK+k,_BT+_SK+_KT+k*5+randint(25,75), t = randint(60,100) , FX1 = alpha(255)+fsc(randint(5,10),randint(5,10)), FX2 = alpha(0)+fsc(randint(10,20),randint(10,20)), offset = 0, a1 = None,a2 = None)
- ass_main(ASS_BUF,SubL(_BT+_SK+k,_BT+_SK+_KT+k*5+randint(25,75),2),an(5)+fad(20,50)+color1("FFFFFF")+color3("DC76FF")+bord(0.4)+blur(4)+fsc(5,5)+move(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-40,40),_Y+randint(-5,85))+EFT ,"{\p1}m 46 54 l 1 56 l 46 57 b 46 58 47 60 47 60 b 42 66 37 72 32 77 b 38 72 43 67 49 62 b 49 63 51 64 52 64 b 53 79 53 93 54 107 b 54 93 55 79 56 64 b 56 65 58 63 59 62 l 76 78 l 60 61 b 61 60 61 57 61 57 l 106 56 l 61 54 b 61 54 60 51 60 51 l 75 35 l 59 49 b 58 48 57 47 55 47 l 54 1 l 52 47 b 50 47 49 48 49 49 l 32 34 l 47 51 b 47 52 46 53 46 54")
- ass_main(ASS_BUF,SubL(_BT+_SK+k,_BT+_SK+_KT+k*5+randint(25,75),2),an(5)+fad(20,50)+color1("FFFFFF")+color3("DC76FF")+bord(0.4)+blur(4)+fsc(5,5)+move(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-40,40),_Y+randint(-105,5))+EFT ,"{\p1}m 46 54 l 1 56 l 46 57 b 46 58 47 60 47 60 b 42 66 37 72 32 77 b 38 72 43 67 49 62 b 49 63 51 64 52 64 b 53 79 53 93 54 107 b 54 93 55 79 56 64 b 56 65 58 63 59 62 l 76 78 l 60 61 b 61 60 61 57 61 57 l 106 56 l 61 54 b 61 54 60 51 60 51 l 75 35 l 59 49 b 58 48 57 47 55 47 l 54 1 l 52 47 b 50 47 49 48 49 49 l 32 34 l 47 51 b 47 52 46 53 46 54")
- ass_main(ASS_BUF,SubL(_BT+_SK+k,_BT+_SK+_KT+k*5+randint(25,75),2),an(5)+fad(20,50)+color1("FFFFFF")+color3("DC76FF")+bord(0.5)+blur(4)+fsc(5,5)+move(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-40,40),_Y+randint(-5,85))+EFT ,"{\p1}m 46 54 l 1 56 l 46 57 b 46 58 47 60 47 60 b 42 66 37 72 32 77 b 38 72 43 67 49 62 b 49 63 51 64 52 64 b 53 79 53 93 54 107 b 54 93 55 79 56 64 b 56 65 58 63 59 62 l 76 78 l 60 61 b 61 60 61 57 61 57 l 106 56 l 61 54 b 61 54 60 51 60 51 l 75 35 l 59 49 b 58 48 57 47 55 47 l 54 1 l 52 47 b 50 47 49 48 49 49 l 32 34 l 47 51 b 47 52 46 53 46 54")
-
- return (ASS_BUF,None)
-
复制代码 #################################################################
中文:- from tcaxPy import *
- from s import *
- from util.gdiFont import * #加入GDIfont模块
- from util.tcCurve import *
- import math
- import random
- from util.cairo import *
- 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
- global _3C
- global _KarTime
- _KarTime = GetVal(val_KarTime)# 第i句卡拉OK歌词的第j个字符的Karaoke时间 = !$start!
- _H = GetVal(val_FontSize)
- _3C = GetVal(val_3C)
- _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)
-
- global ctx
- fx_width = GetVal(val_ResolutionX)
- fx_height = GetVal(val_ResolutionY)
- surface = ImageSurface(FORMAT_ARGB32, fx_width, fx_height)
- ctx = Context(surface)
- 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 x_filter(x, y, param):
- _A, dx, dy, frame_pct = param
- max_diff_x = randint(-1* 8,1* 8)
- max_diff_y = randint(-1* 8,1* 8)
- p = 1+0.5*(1-frame_pct)
- new_x = floor(x*p-_A*4*(p-1) + max_diff_x)
- new_y = floor(y*p-_Fs*4*(p-1) + max_diff_y)
- return new_x, new_y
- class Randnon_rep : #生成不重复随机整数
- def __init__(self):
- self.num = []
-
- def randnum(self,n,m) :
- data = random.randint(n,m)
- while True:
- if len(self.num) < (m-n+1) :
- if data not in self.num:
- self.num.append(data)
- return data
- else :
- data = random.randint(n,m)
- else :
- self.num = []
- rdm = Randnon_rep()
- colour = ["B4942F","614EB6","EAAA95","9A401E","7B9E41","41C9A4","3E9EF2","7F3147","786E34"]
- shape = ["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 ","m 6 0 b 12 0 12 7 6 7 b 0 7 0 0 6 0 ","m 15 0 l 10 7 l 0 9 l 9 13 l 5 23 l 15 17 l 25 23 l 21 13 l 31 9 l 20 7 l 15 0 "]
- def tcaxPy_Main(_i, _j, _n, _BT, _ET, _SK, _KT, _X, _Y, _A, _TXT):
- ASS_BUF = [] # 用于保存ASS特效
- _7X = _X - int((_A + GetVal(val_Spacing)) / 2 + 0.5) #每个字的上X坐标= !$left!
- _7Y = _Y - int(_Fs / 2 + 0.5) #每个字的上Y坐标=!$top!
- _bottom = _Y + int(_H / 2 + 0.5) #每个字的下Y坐标
- if (_i > -1 and _i <4) :
- ass_main(ASS_BUF, SubL(_BT-25+rdm.randnum(-5,25),_BT),pos(_X, _Y)+blur(2)+color3(colour[0]), _TXT)
- ass_main(ASS_BUF, SubL(_BT,_ET),an(5)+pos(_X, _Y)+blur(2)+color3(colour[0]), _TXT)
- ass_main(ASS_BUF,SubL(_ET,_ET+10+rdm.randnum(-5,10),2),an(5)+pos(_X,_Y)+blur(2)+color3(colour[0]) ,_TXT)
- elif (_i > 3 and _i <6) :
- ass_main(ASS_BUF, SubL(_BT-25+rdm.randnum(-5,25),_BT),pos(_X, _Y)+blur(2)+color3(colour[1]), _TXT)
- ass_main(ASS_BUF, SubL(_BT,_ET),an(5)+pos(_X, _Y)+blur(2)+color3(colour[1]), _TXT)
- ass_main(ASS_BUF,SubL(_ET,_ET+10+rdm.randnum(-5,10),2),an(5)+pos(_X,_Y)+blur(2)+color3(colour[1]) ,_TXT)
- elif (_i > 5 and _i <8) :
- ass_main(ASS_BUF, SubL(_BT-25+rdm.randnum(-5,25),_BT),pos(_X, _Y)+blur(2)+color3(colour[2]), _TXT)
- ass_main(ASS_BUF, SubL(_BT,_ET),an(5)+pos(_X, _Y)+blur(2)+color3(colour[2]), _TXT)
- ass_main(ASS_BUF,SubL(_ET,_ET+10+rdm.randnum(-5,10),2),an(5)+pos(_X,_Y)+blur(2)+color3(colour[2]) ,_TXT)
-
- elif (_i > 7 and _i < 10 ) :
- if _j < 0.1*_n*randint(3,8) :
- ass_main(ASS_BUF, SubL(_BT-40,_BT-20),move(_X+200, _Y-200,_X+19,_Y-19)+fsc(0,0)+t(fsc(90,90))+fad(100,0)+blur(2)+color3(colour[3]), _TXT)
- ass_main(ASS_BUF, SubL(_BT-20,_BT),move(_X+19,_Y-19,_X,_Y)+fsc(90,90)+t(fsc(100,100))+fad(100,0)+blur(2)+color3(colour[3]), _TXT)
- else :
- ass_main(ASS_BUF, SubL(_BT-30,_BT-10),move(_X+200, _Y-200,_X+19,_Y-19)+fsc(0,0)+t(fsc(90,90))+fad(100,0)+blur(2)+color3(colour[3]), _TXT)
- ass_main(ASS_BUF, SubL(_BT-10,_BT),move(_X+19,_Y-19,_X,_Y)+fsc(90,90)+t(fsc(100,100))+fad(100,0)+blur(2)+color3(colour[3]), _TXT)
- ass_main(ASS_BUF, SubL(_BT,_ET),an(5)+pos(_X, _Y)+blur(2)+color3(colour[3]), _TXT)
- ass_main(ASS_BUF,SubL(_ET,_ET+30,2),an(5)+org(0,0)+t(frz(rdm.randnum(-6,6))+fsc(0,0)+alpha3(0)+color1(colour[3]))+move(_X,_Y,_X+randint(-400,400),_Y+randint(-400,100))+fad(0,120)+color3(colour[3]) ,_TXT)
-
- elif _i == 10 or _i == 11:
- ass_main(ASS_BUF, SubL(_BT-30,_BT+10),an(5)+pos(_X, _Y)+blur(15)+alpha3(255)+be(15)+color3(colour[4])+bord(0)+fsc(160,160)+t(0,300,fsc(100,100)+blur(2)+be(1))+t(200,300,bord(2)+alpha(100)), _TXT)
- ass_main(ASS_BUF, SubL(_BT+10,_ET),an(5)+pos(_X, _Y)+blur(2)+t(0,100,color3(colour[3])), _TXT)
- ass_main(ASS_BUF, SubL(_ET,_ET+30),an(5)+pos(_X, _Y)+t(0,50,bord(0)+alpha3(255))+t(30,300,fsc(160,160)+blur(15)+be(15)), _TXT)
-
- elif _i == 12:
- ass_main(ASS_BUF, SubL(_BT-30,_BT+10),an(5)+pos(_X, _Y)+blur(15)+alpha3(255)+be(15)+color3(colour[4])+bord(0)+fsc(160,160)+t(0,300,fsc(100,100)+blur(2)+be(1))+t(200,300,bord(2)+alpha(100)), _TXT)
- ass_main(ASS_BUF, SubL(_BT+10,_ET),an(5)+pos(_X, _Y)+blur(2)+t(0,100,color3(colour[5])), _TXT)
- for s in range(5):
- ass_main(ASS_BUF, SubL(_BT+randint(-30,50),_ET+randint(100,150),2),an(5)+color3(colour[5])+fad(300,500)+blur(6)+fsc(randint(5,50),randint(5,50))+moves4(_X+randint(-90,70),_Y+randint(-80,60),_X+randint(-60,60),_Y+randint(-40,70),_X+randint(-60,60),_Y+randint(-40,68),_X+randint(-50,50),_Y+randint(-60,60)),"{\\p2}m 21 16 b 17 16 17 23 21 23 b 25 23 26 16 21 16 m 24 19 l 43 20 l 24 20 m 18 19 l 0 20 l 18 20 m 20 16 l 21 0 l 22 16 m 20 23 l 21 40 l 22 23 ")
- ass_main(ASS_BUF, SubL(_ET,_ET+30+rdm.randnum(-20,15)),an(5)+blur(2)+color3(colour[5])+move(_X, _Y,_X, _Y-randint(650,720))+t(alpha(255)), _TXT)
-
- elif _i == 13:
- ass_main(ASS_BUF, SubL(_BT-30,_BT+10),an(5)+pos(_X, _Y)+blur(15)+alpha3(255)+be(15)+color3(colour[5])+bord(0)+fsc(160,160)+t(0,300,fsc(100,100)+blur(2)+be(1))+t(200,300,bord(2)+alpha(100)), _TXT)
- ass_main(ASS_BUF, SubL(_BT+10,_ET),an(5)+pos(_X, _Y)+blur(2)+t(0,100,color3(colour[6])), _TXT)
- for s in range(5):
- ass_main(ASS_BUF, SubL(_BT+randint(-30,50),_ET+randint(100,150),2),an(5)+color3(colour[6])+fad(300,500)+blur(6)+fsc(randint(5,50),randint(5,50))+moves4(_X+randint(-90,70),_Y+randint(-80,60),_X+randint(-60,60),_Y+randint(-40,70),_X+randint(-60,60),_Y+randint(-40,68),_X+randint(-50,50),_Y+randint(-60,60)),"{\\p2}m 21 16 b 17 16 17 23 21 23 b 25 23 26 16 21 16 m 24 19 l 43 20 l 24 20 m 18 19 l 0 20 l 18 20 m 20 16 l 21 0 l 22 16 m 20 23 l 21 40 l 22 23 ")
- ass_main(ASS_BUF, SubL(_ET,_ET+30+rdm.randnum(-20,15)),an(5)+blur(2)+color3(colour[6])+move(_X, _Y,_X, _Y-randint(650,720))+t(alpha(255)), _TXT)
-
- elif _i ==14 :
- ass_main(ASS_BUF, SubL(_BT-30,_BT+10),an(5)+pos(_X, _Y)+blur(15)+alpha3(255)+be(15)+color3(colour[6])+bord(0)+fsc(160,160)+t(0,300,fsc(100,100)+blur(2)+be(1))+t(200,300,bord(2)+alpha(100)), _TXT)
- ass_main(ASS_BUF, SubL(_BT+10,_BT+_SK+_KT),an(5)+pos(_X, _Y)+blur(2)+t(0,100,color3(colour[6]))+fad(0,80), _TXT)
- ass_main(ASS_BUF,SubL(_BT+_SK+_KT,_ET,2),an(5)+pos(_X, _Y)+blur(2)+color3(colour[6]) ,_TXT)
- ass_main(ASS_BUF, SubL(_ET,_ET+30),an(5)+pos(_X, _Y)+t(0,50,bord(0)+alpha3(255))+t(30,300,fsc(160,160)+blur(15)+be(15)), _TXT)
-
- for j in range(10):
- ass_main(ASS_BUF,SubL(_BT+_SK+j,_BT+_SK+_KT+j*5+randint(25,75),2),an(5)+fad(20,50)+color1("FFFFFF")+color3("DC76FF")+bord(randint(1,15)*0.1)+blur(randint(5,20)*0.1)+fsc(randint(3,8),randint(3,8))+move(_X+randint(-5,5),_Y+randint(-50,-10),_X+randint(-50,50),_Y+randint(-5,25)) ,"{\p1}m 0 -2 l -3 1 l -1 3 l 1 3 l 3 1 l 0 -2")
- ass_main(ASS_BUF,SubL(_BT+_SK+j,_BT+_SK+_KT+j*5+randint(25,75),2),an(5)+fad(20,50)+color1("FFFFFF")+color3("DC76FF")+bord(randint(1,15)*0.1)+blur(randint(5,20)*0.1)+fsc(randint(3,8),randint(3,8))+move(_X+randint(-5,5),_7Y+randint(-50,-10),_X+randint(-50,50),_7Y+randint(-15,15)) ,"{\p1}m 0 -2 l -3 1 l -1 3 l 1 3 l 3 1 l 0 -2")
- ass_main(ASS_BUF,SubL(_BT+_SK+j,_BT+_SK+_KT+j*5+randint(25,75),2),an(5)+fad(20,50)+color1("FFFFFF")+color3("DC76FF")+bord(randint(1,15)*0.1)+blur(randint(5,20)*0.1)+fsc(randint(3,8),randint(3,8))+move(_X+randint(-5,5),_bottom+randint(-5,5),_X+randint(-50,50),_bottom+randint(-5,100)) ,"{\p1}m 0 -2 l -3 1 l -1 3 l 1 3 l 3 1 l 0 -2")
- for k in range(3):
- EFT = alt(_BT+_SK+k,_BT+_SK+_KT+k*5+randint(25,75), t = randint(60,100) , FX1 = alpha(255)+fsc(randint(5,10),randint(5,10)), FX2 = alpha(0)+fsc(randint(10,20),randint(10,20)), offset = 0, a1 = None,a2 = None)
- ass_main(ASS_BUF,SubL(_BT+_SK+k,_BT+_SK+_KT+k*5+randint(25,75),2),an(5)+fad(20,50)+color1("FFFFFF")+color3("DC76FF")+bord(0.4)+blur(4)+fsc(5,5)+move(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-40,40),_Y+randint(-5,85))+EFT ,"{\p1}m 46 54 l 1 56 l 46 57 b 46 58 47 60 47 60 b 42 66 37 72 32 77 b 38 72 43 67 49 62 b 49 63 51 64 52 64 b 53 79 53 93 54 107 b 54 93 55 79 56 64 b 56 65 58 63 59 62 l 76 78 l 60 61 b 61 60 61 57 61 57 l 106 56 l 61 54 b 61 54 60 51 60 51 l 75 35 l 59 49 b 58 48 57 47 55 47 l 54 1 l 52 47 b 50 47 49 48 49 49 l 32 34 l 47 51 b 47 52 46 53 46 54")
- ass_main(ASS_BUF,SubL(_BT+_SK+k,_BT+_SK+_KT+k*5+randint(25,75),2),an(5)+fad(20,50)+color1("FFFFFF")+color3("DC76FF")+bord(0.4)+blur(4)+fsc(5,5)+move(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-40,40),_Y+randint(-105,5))+EFT ,"{\p1}m 46 54 l 1 56 l 46 57 b 46 58 47 60 47 60 b 42 66 37 72 32 77 b 38 72 43 67 49 62 b 49 63 51 64 52 64 b 53 79 53 93 54 107 b 54 93 55 79 56 64 b 56 65 58 63 59 62 l 76 78 l 60 61 b 61 60 61 57 61 57 l 106 56 l 61 54 b 61 54 60 51 60 51 l 75 35 l 59 49 b 58 48 57 47 55 47 l 54 1 l 52 47 b 50 47 49 48 49 49 l 32 34 l 47 51 b 47 52 46 53 46 54")
- ass_main(ASS_BUF,SubL(_BT+_SK+k,_BT+_SK+_KT+k*5+randint(25,75),2),an(5)+fad(20,50)+color1("FFFFFF")+color3("DC76FF")+bord(0.5)+blur(4)+fsc(5,5)+move(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-40,40),_Y+randint(-5,85))+EFT ,"{\p1}m 46 54 l 1 56 l 46 57 b 46 58 47 60 47 60 b 42 66 37 72 32 77 b 38 72 43 67 49 62 b 49 63 51 64 52 64 b 53 79 53 93 54 107 b 54 93 55 79 56 64 b 56 65 58 63 59 62 l 76 78 l 60 61 b 61 60 61 57 61 57 l 106 56 l 61 54 b 61 54 60 51 60 51 l 75 35 l 59 49 b 58 48 57 47 55 47 l 54 1 l 52 47 b 50 47 49 48 49 49 l 32 34 l 47 51 b 47 52 46 53 46 54")
-
- else :
- ass_main(ASS_BUF, SubL(_BT-30,_BT+10),an(5)+pos(_X, _Y)+blur(15)+alpha3(255)+be(15)+color3(colour[8])+bord(0)+fsc(160,160)+t(0,300,fsc(100,100)+blur(2)+be(1))+t(200,300,bord(2)+alpha(100)), _TXT)
- ass_main(ASS_BUF, SubL(_BT+10,_BT+_SK+_KT),an(5)+pos(_X, _Y)+blur(2)+t(0,100,color3(colour[8]))+fad(0,80), _TXT)
- ass_main(ASS_BUF,SubL(_BT+_SK+_KT,_ET,2),an(5)+pos(_X, _Y)+blur(2)+color3(colour[8]) ,_TXT)
- ass_main(ASS_BUF, SubL(_ET,_ET+30),an(5)+pos(_X, _Y)+t(0,50,bord(0)+alpha3(255))+t(30,300,fsc(160,160)+blur(15)+be(15)), _TXT)
-
- for j in range(10):
- ass_main(ASS_BUF,SubL(_BT+_SK+j,_BT+_SK+_KT+j*5+randint(25,75),2),an(5)+fad(20,50)+color1("FFFFFF")+color3("DC76FF")+bord(randint(1,15)*0.1)+blur(randint(5,20)*0.1)+fsc(randint(3,8),randint(3,8))+move(_X+randint(-5,5),_Y+randint(-50,-10),_X+randint(-50,50),_Y+randint(-5,25)) ,"{\p1}m 0 -2 l -3 1 l -1 3 l 1 3 l 3 1 l 0 -2")
- ass_main(ASS_BUF,SubL(_BT+_SK+j,_BT+_SK+_KT+j*5+randint(25,75),2),an(5)+fad(20,50)+color1("FFFFFF")+color3("DC76FF")+bord(randint(1,15)*0.1)+blur(randint(5,20)*0.1)+fsc(randint(3,8),randint(3,8))+move(_X+randint(-5,5),_7Y+randint(-50,-10),_X+randint(-50,50),_7Y+randint(-15,15)) ,"{\p1}m 0 -2 l -3 1 l -1 3 l 1 3 l 3 1 l 0 -2")
- ass_main(ASS_BUF,SubL(_BT+_SK+j,_BT+_SK+_KT+j*5+randint(25,75),2),an(5)+fad(20,50)+color1("FFFFFF")+color3("DC76FF")+bord(randint(1,15)*0.1)+blur(randint(5,20)*0.1)+fsc(randint(3,8),randint(3,8))+move(_X+randint(-5,5),_bottom+randint(-5,5),_X+randint(-50,50),_bottom+randint(-5,100)) ,"{\p1}m 0 -2 l -3 1 l -1 3 l 1 3 l 3 1 l 0 -2")
- for k in range(3):
- EFT = alt(_BT+_SK+k,_BT+_SK+_KT+k*5+randint(25,75), t = randint(60,100) , FX1 = alpha(255)+fsc(randint(5,10),randint(5,10)), FX2 = alpha(0)+fsc(randint(10,20),randint(10,20)), offset = 0, a1 = None,a2 = None)
- ass_main(ASS_BUF,SubL(_BT+_SK+k,_BT+_SK+_KT+k*5+randint(25,75),2),an(5)+fad(20,50)+color1("FFFFFF")+color3("DC76FF")+bord(0.4)+blur(4)+fsc(5,5)+move(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-40,40),_Y+randint(-5,85))+EFT ,"{\p1}m 46 54 l 1 56 l 46 57 b 46 58 47 60 47 60 b 42 66 37 72 32 77 b 38 72 43 67 49 62 b 49 63 51 64 52 64 b 53 79 53 93 54 107 b 54 93 55 79 56 64 b 56 65 58 63 59 62 l 76 78 l 60 61 b 61 60 61 57 61 57 l 106 56 l 61 54 b 61 54 60 51 60 51 l 75 35 l 59 49 b 58 48 57 47 55 47 l 54 1 l 52 47 b 50 47 49 48 49 49 l 32 34 l 47 51 b 47 52 46 53 46 54")
- ass_main(ASS_BUF,SubL(_BT+_SK+k,_BT+_SK+_KT+k*5+randint(25,75),2),an(5)+fad(20,50)+color1("FFFFFF")+color3("DC76FF")+bord(0.4)+blur(4)+fsc(5,5)+move(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-40,40),_Y+randint(-105,5))+EFT ,"{\p1}m 46 54 l 1 56 l 46 57 b 46 58 47 60 47 60 b 42 66 37 72 32 77 b 38 72 43 67 49 62 b 49 63 51 64 52 64 b 53 79 53 93 54 107 b 54 93 55 79 56 64 b 56 65 58 63 59 62 l 76 78 l 60 61 b 61 60 61 57 61 57 l 106 56 l 61 54 b 61 54 60 51 60 51 l 75 35 l 59 49 b 58 48 57 47 55 47 l 54 1 l 52 47 b 50 47 49 48 49 49 l 32 34 l 47 51 b 47 52 46 53 46 54")
- ass_main(ASS_BUF,SubL(_BT+_SK+k,_BT+_SK+_KT+k*5+randint(25,75),2),an(5)+fad(20,50)+color1("FFFFFF")+color3("DC76FF")+bord(0.5)+blur(4)+fsc(5,5)+move(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-40,40),_Y+randint(-5,85))+EFT ,"{\p1}m 46 54 l 1 56 l 46 57 b 46 58 47 60 47 60 b 42 66 37 72 32 77 b 38 72 43 67 49 62 b 49 63 51 64 52 64 b 53 79 53 93 54 107 b 54 93 55 79 56 64 b 56 65 58 63 59 62 l 76 78 l 60 61 b 61 60 61 57 61 57 l 106 56 l 61 54 b 61 54 60 51 60 51 l 75 35 l 59 49 b 58 48 57 47 55 47 l 54 1 l 52 47 b 50 47 49 48 49 49 l 32 34 l 47 51 b 47 52 46 53 46 54")
-
- return (ASS_BUF,None)
-
复制代码 日文tcc:- # tcc file version
- < tcc file version = 1.000 >
- # mode configuration
- < inherit ass header = false >
- < k mode = word >
- < text layout = horizontal >
- < tcaxpy init = true >
- < tcaxpy user = false >
- < tcaxpy fin = false >
- # py settings
- < py file = jiji-011.py > < beg line = 1 > < end line = 0 >
- < k-timed ass file = OP2-JP_k.ass >
- < font file = DFMrg7.ttc > < font face id = 2 > < font size = 38 >
- < fx width = 1280 > < fx height = 720 > < fx fps = 23.976 >
- < alignment = 2 >
- < x offset = 10 > < y offset = 20 >
- < spacing = 0 > < space scale = 1.000 >
- # style settings
- < font face name = "" >
- < bord = 2 > < shad = 0 >
- < primary color = FFFFFF > < secondary color = 000000 > < outline color = B4942F > < back color = 000000 >
- < primary alpha = 0 > < secondary alpha = 240 > < outline alpha = 0 > < back alpha = 240 >
- # additional settings
- < blur = 0.000 >
复制代码 预览:
http://pan.baidu.com/s/1kTwtXB5
|
-
5
查看全部评分
-
|