-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo-2018-2019-with-your-name.py
76 lines (54 loc) · 1.45 KB
/
demo-2018-2019-with-your-name.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
from random import random
from random import randint
from easyCanvasLight import *
from grid import *
from datetime import datetime
canvas = EasyCanvas()
rndCol = canvas.randomColor()
shapse=["circle", "square"]
text = "2018"
size(1000, 1000)
_fontSize = 342
def draw(i, sw, fs, cubeSize):
print(fs)
#fill(0, 0, 0, 1)
#rect(0, 0, 1000, 1000)
canvas = EasyCanvas()
path = BezierPath()
fillColor = (0,0,0)
strokeColor = None
gap = 0
fillOpacity = 0
strokeOpacity = 1
shape = shapse[1]
#fontFamily = ".AlNilePUA-Bold"
fontFamily = "ArimoForPowerline"
path.text( text,
font = fontFamily,
fontSize = fs,
offset= offset
)
grid = Grid(
shape= shape,
size = cubeSize,
gap = gap,
box= path.bounds(),
path = path)
grid.go(
fillColor=fillColor,
strokeColor=strokeColor,
strokeWeight=sw,
fillOpacity= fillOpacity,
strokeOpacity = strokeOpacity )
newPage(1000,1000)
offset = (110,350)
for i in range(0, 35):
draw(i, i+5, _fontSize, 17)
text = "2019"
for i in reversed(range(5, 35)):
draw(i, i-5, _fontSize, 17)
offset = (180,450)
text = "your name"
for i in reversed(range(1, 35)):
draw(i, 1, 100, 5)
saveImage("~/Desktop/pixelator-white-"+ text +".gif")