-
Notifications
You must be signed in to change notification settings - Fork 0
/
data.mk
61 lines (50 loc) · 1.97 KB
/
data.mk
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
##
## data files
##
areas_%.pgm: data.mk
$(CONVERT) -size $* xc: +noise Random \
-virtual-pixel tile -blur 0x20 -channel G -separate -normalize +level 10%,100% \
-compress none $@
plasma_%.pgm: data.mk
$(CONVERT) -size $* plasma:fractal -blur 0x10 -emboss 2 -compress none $@
gradient_%.pgm: data.mk
$(CONVERT) -size $* gradient:grey10-grey90 -distort SRT -45 -compress none $@
uni_%.pgm: data.mk
$(CONVERT) -size $* xc:grey50 -compress none $@
GEN_PATTERN1 = \
w5=`expr $$W \* 5 / 100`; \
h5=`expr $$H \* 5 / 100`; \
midw=`expr $$W / 2`; \
midh=`expr $$H / 2`; \
midw5=`expr $$midw - $$w5`; \
midh5=`expr $$midh - $$h5`; \
$(CONVERT) -size $${W}x$${H} xc:grey50 \
-draw "fill grey45 rectangle 0,0 $$w5,$$H stroke grey75 line 0,0 $$W,$$H line $$midw,0 $$W,$$midh line 0,$$midh $$midw,$$H fill grey95 circle $$midw5,$$midh5 $$midw,$$midh" -compress none
pat1_%.pgm: data.mk
W=`echo $* | cut -dx -f1`; H=`echo $* | cut -dx -f2`; $(GEN_PATTERN1) $@
GEN_PATTERN2 = \
w5=`expr $$W \* 5 / 100`; \
h5=`expr $$H \* 5 / 100`; \
midw=`expr $$W / 2`; \
midh=`expr $$H / 2`; \
midw5=`expr $$midw - $$w5`; \
midh5=`expr $$midh - $$h5`; \
$(CONVERT) -size $${W}x$${H} xc:black \
-draw "fill white circle $$midw5,$$midh5 $$midw,$$midh circle $$midw,$$h5 $$midw,0 rectangle 0,$$midh5 $$w5,$$midh" \
-compress none
pat2_%.pgm: data.mk
W=`echo $* | cut -dx -f1`; H=`echo $* | cut -dx -f2`; $(GEN_PATTERN2) $@
GEN_PATTERN3 = \
w5=`expr $$W \* 5 / 100`; \
h5=`expr $$H \* 5 / 100`; \
midw=`expr $$W / 2`; \
midh=`expr $$H / 2`; \
midw5=`expr $$midw - $$w5`; \
midh5=`expr $$midh - $$h5`; \
$(CONVERT) -size $${W}x$${H} xc:black \
-draw "stroke grey90 fill grey90 polygon 0,0 $$W,0 $$W,$$H fill white circle $$midw5,$$midh5 $$midw,$$midh circle $$midw,$$h5 $$midw,0 rectangle 0,$$midh5 $$w5,$$midh" \
-compress none
pat3_%.pgm: data.mk
W=`echo $* | cut -dx -f1`; H=`echo $* | cut -dx -f2`; $(GEN_PATTERN3) $@
anim.gif: $(wildcard img.*.pgm)
$(CONVERT) $^ +level-colors blue,red $@