- UID
- 285
- 积分
- 1963
- 帖子
- 188
- 主题
- 10
- 论坛币
- 4570
- 威望
- 7
- EP值
- 1037
- MP值
- 38
- 阅读权限
- 50
- 注册时间
- 2012-1-23
- 在线时间
- 517 小时
- 最后登录
- 2018-9-6
|
- from tcaxPy import *
- def RandCir2(a, b, r1, r2, n):
- R = randint(r1, r2)
- x = int(R * cos(n*pi/180) + a)
- y = int(R * sin(n*pi/180) + b)
- x1 = int(R * cos(n*pi/180+pi) + a)
- y1 = int(R * sin(n*pi/180+pi) + b)
- return (x,y,x1,y1)
- def RandCir(a, b, r1, r2, n):
- R = randint(r1, r2)
- x = AdvInt(R * cos(n) + a)
- y = AdvInt(R * sin(n) + b)
- return (x, y)
- def RandCir3(a, b, R, n):
- x = int(R * cos(n*pi/180) + a)
- y = int(R * sin(n*pi/180) + b)
- x1 = int(R * cos(n*pi/180+pi) + a)
- y1 = int(R * sin(n*pi/180+pi) + b)
- return (x,y,x1,y1)
- 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 = []
- dx = _x - int(_a / 2 + 0.5)
- dy = _y - int(_Fs / 2 + 0.5)
- if _i < 11 or _i == 14 or _i == 15 :
- for i in range (20):
- ass_main(ASS_BUF, SubL(_BT+_SK+_KT/50*i,_BT+_SK+_KT+10,20-i+1),pos(_x,_y)+fad(0,50)+color3("FFFFFF")+be(6/15*i)+alpha1(15*i)+alpha3(12*i)+color1("F23023")+fs(_Fs-10+i*1.5)+t(_KT*3,_KT*10-_KT/5*i+50,alpha1(256)+alpha3(256)+fs(_Fs)), _txt)
- ass_main(ASS_BUF, SubL(_BT+_j*6,_ET+_j*6,1),an(5)+pos(_x,_y)+fad(250,200)+be(6)+bord(4)+blur(6), _txt)
- if _i < 11 or _i == 14 or _i == 15 :
- nk1 = (0,1,2,3)
- n = nk1[randint(0,3)]*90+randint(43,58)
- nk = (-1,0,1)
- n2 = n-180*nk[randint(0,1)]+randint(-15,15)
- zj = RandCir(_x,_y,25,35,n)
- zj2 = RandCir(_x,_y,65,75,n2)
- num = 80 # 曲线上点的个数
- x1 = randint(30,40)
- x2 = randint(-40,-30)
- xc = [x1,x2] # 控制点1
- yc = xc[randint(0,1)]
- xs = _x +yc
- ys = _y + yc # 开始点
- xc1 = _x + randint(-60,60) # 控制点2
- yc1 = _y + randint(-60,60)
- xe = _x # 结束点
- ye = _y
- points = Bezier2(num, zj[0], zj[1], xe, ye, zj2[0], zj2[1]) # 3阶贝塞尔曲线, 控制点的生成是重点以及难点
- for i in range(num):
- POS = pos(points[i][0], points[i][1]) # 获取曲线上点坐标
- EFT = POS+color3('FFFFFF')+color1('FFFFFF')+bord(1)+t(fs(0)+bord(0)) + fad(0, 200)
- ass_main(ASS_BUF, SubL(_BT+_SK-100+i/60*80, _BT+_SK-100+i/60*80+60,0), EFT, PixPt())
- for i in range(7):
- ass_main(ASS_BUF, SubL(_BT+_SK-5, _BT+_SK+randint(100,200),0), move(_x,_y,_x+randint(-50,50),_y+randint(-50,30))+fad(150,300)+color3('FFFFFF')+bord(0)+fsc(1000,1000)+t(frz(randint(-60,60)))+fscy(150), "{\p4}m 0 0 l 0 -13 l 1 0 l 14 -7 l 2 1 l 14 7 l 1 2 l 1 15 l 0 2 l -13 7 l -1 1 l -13 -7 ")
- if _i > 10 and _i < 14 :
- for i in range (20):
- ass_main(ASS_BUF, SubL(_BT+_SK+_KT/50*i,_BT+_SK+_KT+10,200-i+1),pos(_x,_y)+fad(0,50)+color3("FFFFFF")+be(6/15*i)+alpha1(15*i)+alpha3(12*i)+color1("19C25A")+fs(_Fs-10+i*1.5)+t(_KT*3,_KT*10-_KT/5*i+50,alpha1(256)+alpha3(256)+fs(_Fs)), _txt)
- ass_main(ASS_BUF, SubL(_BT+_j*6,_ET+_j*6,0),an(5)+pos(_x,_y)+fad(250,200)+be(2)+bord(2)+t((_SK-_j*6)*10,(_SK-_j*6+_KT/2)*10,be(6)+bord(4)+blur(6)+color3("19C25A")), _txt)
- for i in range(7):
- ass_main(ASS_BUF, SubL(_BT+_SK-5, _BT+_SK+randint(100,200),0), move(_x,_y,_x+randint(-50,50),_y+randint(-50,30))+fad(150,300)+color3('FFFFFF')+bord(0)+fsc(1000,1000)+t(frz(randint(-60,60)))+fscy(150), "{\p4}m 0 0 l 0 -13 l 1 0 l 14 -7 l 2 1 l 14 7 l 1 2 l 1 15 l 0 2 l -13 7 l -1 1 l -13 -7 ")
- if _j == 0 :
- dx = _x - int(_a / 2 + 0.5)
- dy = _y - int(_Fs / 2 + 0.5)
- _TextLength = GetVal(val_TextLength)
- for k in range (randint(int(0.5*_n),int(0.8*_n))):
- num = 20
- _x = dx + randint(20,_TextLength[_i]-20)
- n = randint(-40,10)
- n2 = n+randint(170,190)
- zj = RandCir2(_x,_y,30,55,n)
- ze = RandCir(_x,_y,30,55,n+pi)
- r = randint(15,25)
- zk1 = RandCir3(zj[0], zj[1],r,n2)
- zk2 = RandCir3(ze[0], ze[1],r,n2-180)
- kt = _BT+randint(0,_ET-_BT-25)
- sf = randint(18,24)
- points = Bezier3(num, zj[0], zj[1], zj[2], zj[3], zk1[0], zk1[1], zk2[0], zk2[1]) # 3阶贝塞尔曲线, 控制点的生成是重点以及难点
- for k in range(randint(3,5)):
- for i in range(num):
- POS = pos(points[i][0]+randint(-5,5), points[i][1]+randint(-5,5)) # 获取曲线上点坐标
- EFT = color1('FFFFFF')+bord(0) + fad(0,randint(150,250))+fscx(sf)+fscy(sf)+alpha1(randint(20,90))+blur(randint(0,3))+move(points[i][0]+randint(-4,4), points[i][1]+randint(-4,5),points[i][0]+randint(-15,15), points[i][1]+randint(-15,15),200,900)+t(500,900,fscy(0)+fscx(0))
- ass_main(ASS_BUF, SubL(kt+i*3,kt+i*3+randint(45,80),k+3), EFT,"●")
- return (ASS_BUF, None)
复制代码 没什么好说的..........
视频预览 |
-
1
查看全部评分
-
|