summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib/luatikz/example/blinea.lua
blob: 8a49476e511d301344b1da5c23e8d8ceaa6e1a7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
tikz.within( '*' )

local l1 = bline{ p{ 0, 0 }, p{ 2, 3 }, bend_right = 45 }
local l2 = bline{ p{ 0, 3 }, p{ 2, 1 }, bend_left  = 30 }

draw{ draw=red,  l1 }
draw{ draw=blue, l2 }
put{
	node{
		at = l1.pc,
		anchor = south,
		rotate = l1.line.phi * 180 / math.pi,
		text = 'red',
	}
}
put{
	node{
		at = l2.pc,
		anchor = south,
		rotate = l2.line.phi * 180 / math.pi,
		text = 'blue',
	}
}