lineWidth of line on Canvas



Drag the slider to change the width of the line.
var my_canvas=$('#my_canvas').get(0)
var gctx = my_canvas.getContext("2d");
gctx.beginPath()
gctx.moveTo(20,30);
gctx.lineTo(360,160);
gctx.lineWidth=10;
gctx.stroke();

lineWidth with Rectangle

<script>
var my_canvas=document.getElementById("my_canvas2");
var jctx=my_canvas.getContext("2d");
jctx.lineWidth=12;
jctx.strokeRect(120,30,120,100);
</script>


plus2net.com




Post your comments , suggestion , error , requirements etc here .




We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2020 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer