util/examples/script/context2d/scripts/stroke1.js
changeset 7 f7bc934e204c
equal deleted inserted replaced
3:41300fa6a67c 7:f7bc934e204c
       
     1 var ctx = document.getElementById('tutorial').getContext('2d');
       
     2     for (i=0;i<6;i++){
       
     3       for (j=0;j<6;j++){
       
     4         ctx.strokeStyle = 'rgb(0,' + Math.floor(255-42.5*i) + ',' + 
       
     5                          Math.floor(255-42.5*j) + ')';
       
     6         ctx.beginPath();
       
     7         ctx.arc(12.5+j*25,12.5+i*25,10,0,Math.PI*2,true);
       
     8         ctx.stroke();
       
     9       }
       
    10     }