followingup-titlepage.tex /size: 1653 b    last modification: 2021-10-28 13:50
1% language=us runpath=texruns:manuals/followingup
2
3\startcomponent followingup-titlepage
4
5\environment followingup-style
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 --               d[j] = { 0, 0, random(100,200) }
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      % fill Page
32      %     withcolor "maincolor" ;
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] % doubledided=no
53    \startoverlay
54      % {luametatex} % for searching
55        {\scale[width=\paperwidth]{\ctxlua{document.graphic()}}}
56        {\useMPgraphic{graphic}}
57    \stopoverlay
58\stoppagemakeup
59
60\stopcomponent
61