luametafun-lines.tex /size: 957 b    last modification: 2025-02-21 11:03
1% language=us runpath=texruns:manuals/luametafun
2
3\environment luametafun-style
4
5\startcomponent luametafun-lines
6
7\startchapter[title={Lines}]
8
9We assume that when you arrived here you already know how to deal with drawing
10lines including the way they get connected. When you draw a line some properties
11are controlled by variables which forces you to save existing values when you
12temporarily adapts them.
13
14\startbuffer
15\startMPcode
16draw (0, 0) -- (20, 0)                                withcolor "darkyellow" ;
17draw (0,-1) -- (20,-1)           withlinecap  butt    withcolor "darkred" ;
18draw (0,-2) -- (20,-2)           withlinecap  squared withcolor "darkgreen" ;
19draw (0,-3) -- (20,-3) -- (0,-4) withlinejoin squared withcolor "darkblue" ;
20\stopMPcode
21\stopbuffer
22
23\typebuffer[option=TEX]
24
25These \type {with} features are a \LUAMETATEX\ extension:
26
27\startlinecorrection \scale[width=1tw]{\getbuffer} \stoplinecorrection
28
29\stopchapter
30
31\stopcomponent
32
33
34