UNPKG
test-gcanvas-node
Version:
latest (1.0.1)
1.0.1
1.0.0
gcanvas for node developer
test-gcanvas-node
/
core
/
test
/
benchmarks
/
verb
/
tc_sample_path_transform.js
22 lines
(11 loc)
•
241 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
ctx.lineWidth = 10; ctx.beginPath(); ctx.translate(100, 100); ctx.save(); ctx.moveTo(200, 200); ctx.lineTo(250, 250); //rotate ctx.setTransform(1, 0.5, -0.5, 1, 30*ratio, 10*ratio); ctx.lineTo(200, 0); ctx.restore(); ctx.stroke();