File: stroke1.js

package info (click to toggle)
qtscript-opensource-src 5.15.15%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 29,776 kB
  • sloc: cpp: 163,715; javascript: 94,206; yacc: 1,768; ansic: 1,718; perl: 425; sh: 169; python: 55; makefile: 14
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();
      }
    }