14
edits
(Show how to draw arcs using canvas) |
|||
Line 376: | Line 376: | ||
=== arcLargeCWTo === | === arcLargeCWTo === | ||
=== arcLargeCW === | === arcLargeCW === | ||
Drawing arcs examples : | |||
[[File:Canvas arc.png|thumb|Canvas arc draw examples]] | |||
<syntaxhighlight lang="nasal"> | |||
var fpv = group.createChild("group", "FPV"); | |||
fpv.createChild("path").setStrokeLineWidth(4).set("stroke", "rgba(255,0,255,1)") | |||
.moveTo(100, 100).arcSmallCCW(50, 50, 0, 50, 50); | |||
fpv.createChild("path").setStrokeLineWidth(4) .set("stroke", "rgba(255,0,255,1)") | |||
.moveTo(300, 100).arcSmallCCW(50, 50, 0, 100, 0); | |||
fpv.createChild("path").setStrokeLineWidth(4).set("stroke", "rgba(255,0,255,1)") | |||
.moveTo(500, 100).arcSmallCCW(50, 50, 0, 50, -50); | |||
fpv.createChild("path").setStrokeLineWidth(4).set("stroke", "rgba(55,0,255,1)") | |||
.moveTo(100, 300).arcSmallCW(50, 50, 0, 50, 50); | |||
fpv.createChild("path").setStrokeLineWidth(4).set("stroke", "rgba(55,0,255,1)") | |||
.moveTo(300, 300).arcSmallCW(50, 50, 0, 100, 0); | |||
fpv.createChild("path").setStrokeLineWidth(4).set("stroke", "rgba(55,0,255,1)") | |||
.moveTo(500, 300).arcSmallCW(50, 50, 0, 50, -50); | |||
fpv.createChild("path").setStrokeLineWidth(4).set("stroke", "rgba(255,0,55,1)") | |||
.moveTo(100, 500).arcLargeCCW(50, 50, 0, 50, 50); | |||
fpv.createChild("path").setStrokeLineWidth(4).set("stroke", "rgba(255,0,55,1)") | |||
.moveTo(300, 500).arcLargeCCW(50, 50, 0, 100, 0); | |||
fpv.createChild("path").setStrokeLineWidth(4).set("stroke", "rgba(255,0,55,1)") | |||
.moveTo(500, 500).arcLargeCCW(50, 50, 0, 50, -50); | |||
fpv.createChild("path").setStrokeLineWidth(4).set("stroke", "rgba(255,0,55,1)") | |||
.moveTo(100, 500).arcLargeCCW(50, 50, 0, 50, 50); | |||
fpv.createChild("path").setStrokeLineWidth(4).set("stroke", "rgba(255,0,55,1)") | |||
.moveTo(300, 500).arcLargeCCW(50, 50, 0, 100, 0); | |||
fpv.createChild("path").setStrokeLineWidth(4).set("stroke", "rgba(255,0,55,1)") | |||
.moveTo(500, 500).arcLargeCCW(50, 50, 0, 50, -50); | |||
fpv.createChild("path").setStrokeLineWidth(4).set("stroke", "rgba(255,0,55,1)") | |||
.moveTo(100, 700).arcLargeCW(50, 50, 0, 50, 50); | |||
fpv.createChild("path").setStrokeLineWidth(4).set("stroke", "rgba(255,0,55,1)") | |||
.moveTo(300, 700).arcLargeCW(50, 50, 0, 100, 0); | |||
fpv.createChild("path").setStrokeLineWidth(4).set("stroke", "rgba(255,0,5 | |||
</syntaxhighlight> | |||
=== close === | === close === | ||
=== setColor === | === setColor === |
edits