My favorites | Sign in
Project Home Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!doctype html>
<title>Bazgroly</title>
<canvas id="pacman" width="500" height="500">
<script>
window.onload = function() {
var canvas = document.getElementById("pacman");
var g = canvas.getContext("2d");

/* pacman */
g.lineWidth = 2;
g.fillStyle = "#ee0";
g.beginPath();
g.moveTo(250,250);
g.arc(250,250, 100, -1,1, true);
g.lineTo(250, 250);
g.fill();
g.stroke();

/* oko */
g.fillStyle = "#fff";
g.beginPath();
g.arc(230,200, 20, 0,2*3.14, false);
g.fill();

/* kulki */
g.fillStyle = "#0b0";
g.beginPath();
g.arc(320,250, 25, 0,2*3.14, false);
g.fill();
g.beginPath();
g.arc(420,250, 25, 0,2*3.14, false);
g.fill();

}
</script>

Change log

r18 by grr...@szsz.pl on Aug 22, 2009   Diff
Eksperiments with canvas
Go to: 
Project members, sign in to write a code review

Older revisions

All revisions of this file

File info

Size: 664 bytes, 35 lines
Powered by Google Project Hosting