The strokeText 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
[No canvas support]

The strokeText function is very similar to the fillText function - however it draws the outline of the text and doesn't fill it - as you can see from the example. In many use cases you can use the fillText function and ignore this entirely.

Arguments to the function

An example

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

        context.font = '36pt Arial';
        context.strokeText('Some example text', 50,  50);
    }
</script>

See also

Comments

© Copyright Richard Heyes 2008-2017
Terms and conditions   Privacy policy   Sitemap   About