File: stroke1.js

package info (click to toggle)
qtscript-opensource-src 5.3.2%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 26,028 kB
  • ctags: 29,512
  • sloc: cpp: 163,653; ansic: 2,202; yacc: 1,768; perl: 425; sh: 211; python: 55; makefile: 25
file content (10 lines) | stat: -rw-r--r-- 355 bytes parent folder | download | duplicates (20)
1
2
3
4
5
6
7
8
9
10
var ctx = document.getElementById('tutorial').getContext('2d');
    for (i=0;i<6;i++){
      for (j=0;j<6;j++){
        ctx.strokeStyle = 'rgb(0,' + Math.floor(255-42.5*i) + ',' + 
                         Math.floor(255-42.5*j) + ')';
        ctx.beginPath();
        ctx.arc(12.5+j*25,12.5+i*25,10,0,Math.PI*2,true);
        ctx.stroke();
      }
    }