- UID
- 285
- 积分
- 1963
- 帖子
- 188
- 主题
- 10
- 论坛币
- 4570
- 威望
- 7
- EP值
- 1037
- MP值
- 38
- 阅读权限
- 50
- 注册时间
- 2012-1-23
- 在线时间
- 517 小时
- 最后登录
- 2018-9-6
|
本帖最后由 kk123456 于 2013-2-25 22:53 编辑
- from tcaxPy import *
- from gdiFont 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 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_Fin():
- FinFont(Font)
- def tcaxPy_Main(_i, _j, _n, _BT, _ET, _SK, _KT, _x, _y, _a, _txt):
- ASS_BUF = []
-
- Font1 = InitFont(_FontFileName, _FaceID, _Fs+3, GetVal(val_Spacing), GetVal(val_SpaceScale), 0xFFFFFF, 0, 0)
- dx = _x - int(_a / 2 + 0.5)
- dy = _y - int(_Fs / 2 + 0.5)
- mask = TextOutlineDraw(Font, _txt, dx, dy)
- mask1 = TextOutlineDraw(Font1, _txt, dx, dy)
- m = randint(-14,12)
- n = randint(-12,12)
- if _i < 4 :
- ass_main(ASS_BUF, SubL(_BT+_SK-10, _ET-(_n-_j)*4+40,10), an(5) + pos(_x+n, _y+m)+fs(1)+bord(0)+t(0,_KT*10+200,fs(_Fs+20)) + clip2(7, mask)+fad(0,350), "●")
- for k in range (3) :
- for i in range (0,int(_ET+_j*3-_BT-_SK-150),80) :
- img = RandImg(2,12,12)
- x = _x+randint(-10,10)
- y = _y+randint(-25,-5)
- ass_main(ASS_BUF, SubL(_BT+_SK+i, _BT+_SK+i+250,10), blur(randint(1,3))+color1("000000")+bord(0)+clip2(7, mask)+fad(0,200)+move(x,y,x,y+_Fs*1.2), "{\p1}"+img)
- if _i > 3 and _i < 9 :
- 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]
- yc = xc[randint(0,1)]
- xs = _x +yc
- ys = _y + yc
- 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 == 4 or _i == 6 :
- col = ("88D7EE")
- col2 = ("688DDA")
- if _i == 5 or _i == 7 or _i == 8 :
- col = ("D0854A")
- col2 = ("DAA16C")
- for i in range (20):
- 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)
-
- ass_main(ASS_BUF, SubL(_BT+_SK+_KT/50*i,_BT+_SK+_KT+15,20-i+1),pos(_x,_y)+fad(0,50)+color3("FFFFFF")+be(6/15*i)+alpha1(15*i)+alpha3(12*i)+color1(col)+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*5,_ET-(_n-_j)*4+40,1),an(5)+pos(_x,_y)+fad(250,350)+be(6)+bord(4)+blur(6)+color3(col2), _txt)
- if _i > 8 and _i < 13 :
- for k in range(int(_KT/25)):
- for i in range (2) :
- sz = (1,2,3)
- xs = dx + i*(_a+10)/3 + randint(-15,15)
- ys = dy + randint(-12,-5)
- xe = xs + 35
- ye = ys + _Fs*1.2 +randint(0,10)
- points = Bezier1(50, xs, ys, xe, ye)
- b = bord(randint(6,12)*0.1)
-
- for f in range(50):
- POS = pos(points[f][0], points[f][1])
- EFT = POS+color3('FFFFFF')+color1('FFFFFF')+b+t(0,200,fs(0)+bord(0)) + fad(0, 100)
- ass_main(ASS_BUF, SubL(_BT+_SK+(i-1)*20+(k-1)*30+f+5, _BT+_SK+i*20+(k-1)*30+f+25,10), EFT, PixPt())
-
- ass_main(ASS_BUF, SubL(_BT+_SK, _ET-(_n-_j)*4+40,10), pos(_x+n, _y+m)+fs(1)+bord(0)+t(0,_KT*10,fs(_Fs+10)+blur(5)) + clip2(7, mask)+fad(0,350), "●")
- ass_main(ASS_BUF, SubL(_BT+_j*4, _ET-(_n-_j)*4+40,0), pos(_x, _y)+bord(1)+blur(4)+color1("664157")+t(_SK*10-_j*40,_SK*10+_KT*10-_j*40,color3("DAA16C"))+fad(250,350), _txt)
- if _i > 12 :
- for n in range (1) :
- xs = _x+randint(-80,20)
- ys = _y+randint(-10,55)
- xe = xs+randint(120,135)/_n*(_n-_j+1)
- ye = ys+randint(-20,0)
- ass_main(ASS_BUF, SubL(_BT+_SK, _ET-(_n-_j)*4+40,10),move(xs,ys,xe,ye)+bord(0.6)+blur(2)+t(fr(randint(-60,60)))+fad(200,350)+fsc(75,75)+color1("C6E8E8"), "{\p2}"+"m 0 0 l 0 0 l -2 32 m -2 32 b -2 33 -2 33 -2 32 l -2 32 b -3 35 -3 36 -3 38 b -3 39 -3 41 -2 42 b -2 42 -2 42 -2 42 b -1 40 -1 36 -2 33 l 0 0 l 0 0 m 0 0 l 14 -6 l 5 -5 l 12 -10 l 12 -10 l 6 -7 l 10 -12 l 2 -5 l 9 -15 l 1 -8 l 2 -20 l -1 -7 l -5 -18 l -3 -7 l -10 -14 l -4 -6 l -14 -5 l -3 -4 l -13 -3 ")
- ass_main(ASS_BUF, SubL(_BT+_SK-10, _ET-(_n-_j)*4+40,10), an(5) + pos(_x+n, _y+m)+fs(1)+bord(0)+t(0,_KT*10+200,fs(_Fs+20)) + clip2(7, mask)+fad(0,350), "●")
- ass_main(ASS_BUF, SubL(_BT+_SK-10, _ET-(_n-_j)*4+40,0), pos(_x+n, _y+m)+clip2(7, mask1)+fs(1)+t(0,_KT*8+200,color1("000000"))+bord(0)+t(0,_KT*10+200,fs(_Fs+25))+fad(0,350)+blur(3), "●")
- return (ASS_BUF, None)
复制代码 视频预览
没什么特别的,群邮上有人说要就发上来了 |
-
3
查看全部评分
-
|