The getLineDash function

  Read comments...

The getLineDash function is used to retrieve the current lineDash setting. It returns the same array that you set using the associated setLineDash function.


An example

<script>
    window.onload = function ()
    {
        var canvas  = document.getElementById("cvs");
        var context = canvas.getContext('2d');

        context.setLineDash([3,6]);
        context.beginPath();
        context.arc(125,125,50,0,2 * Math.PI, false);
        context.stroke();
        
        alert(context.getLineDash());
    }
</script>

See also:

Share RGraph
X

Comments