Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

getcontext in javascript

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

        // Fetch the context and stipulate it as having no alpha/opacity
        // var context = canvas.getContext('2d', {alpha: false} );
    
        // var context = canvas.getContext('webgl');              // WebGL 3D ontext
        // var context = canvas.getContext('experimental-webgl'); // Older WebGL 3D context
    }
</script>
Source by www.rgraph.net #
 
PREVIOUS NEXT
Tagged: #getcontext #javascript
ADD COMMENT
Topic
Name
8+7 =