☰
Debian Codegraph
@
5.15.19+dfsg-2
/
/
examples
/
script
/
context2d
/
scripts
/
fill1.js
☽
☼
examples/script/context2d/scripts/fill1.js
code
plain
raw
symbols
SCIP
BSD-3-clause
2017 The Qt Company Ltd.
debian/copyright
1
var
ctx = document.
getElementById
(
'tutorial'
).
getContext
(
'2d'
);
2
for
(i=
0
;i<
6
;i++){
3
for
(j=
0
;j<
6
;j++){
4
ctx.
fillStyle
=
'rgb('
+
Math
.
floor
(
255
-
42.5
*i) +
','
+
5
Math
.
floor
(
255
-
42.5
*j) +
',0)'
;
6
ctx.
fillRect
(j*
25
,i*
25
,
25
,
25
);
7
}
8
}