The getLineDash function

Share RGraph:   To help my Google visibility (it can't get much worse!), if you like and use RGraph I'd appreciate it if you could link to me

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: