1
2
3\startcomponent followinguptitlepage
4
5\environment followingupstyle
6
7\startluacode
8 function document.graphic()
9 local min, max, random, round = math.min, math.max, math.random, math.round
10
11 local width = 210
12 local height = 297
13
14 local bitmap = graphics.bitmaps.new(width,height,"rgb",1)
15 local data = bitmap.data
16
17 for i=1,height do
18 local d = data[i]
19 for j=1,width do
20
21 d[j] = { 0, 0, random(128,255) }
22 end
23 end
24
25 graphics.bitmaps.tocontext(bitmap,"210bp","297bp")
26 end
27\stopluacode
28
29\startuseMPgraphic{graphic}
30 StartPage ;
31
32
33 draw textext.urt("\bf \WORD{following up}")
34 rotated 90
35 ysized (PaperHeight-10mm)
36 shifted lrcorner Page
37 shifted (-10mm,5mm)
38 withcolor "middlegray" ;
39 draw textext.lft("\bf\strut\ConTeXt")
40 ysized 4.5cm
41 shifted lrcorner Page
42 shifted (-50mm,70mm)
43 withcolor "white" ;
44 draw textext.lft("\bf\strut lm\kern-.1ex tx")
45 ysized 4cm
46 shifted lrcorner Page
47 shifted (-50mm,37.5mm)
48 withcolor "white" ;
49 StopPage ;
50\stopuseMPgraphic
51
52\startpagemakeup[pagestate=stop]
53 \startoverlay
54
55 {\scale[width=\paperwidth]{\ctxlua{document.graphic()}}}
56 {\useMPgraphic{graphic}}
57 \stopoverlay
58\stoppagemakeup
59
60\stopcomponent
61 |