Skip to content
Snippets Groups Projects
Commit 04b28e73 authored by david.schimmel's avatar david.schimmel
Browse files

resize canvas

parent 01212482
No related branches found
No related tags found
No related merge requests found
var playerPic = document.createElement("img");
var tilePics=[ ];
var picsToLoad = 2;
//
var SQUARE_SIZE = 900/11;
function countLoadedImageAndLaunchIfReady(){
picsToLoad-=1;
......@@ -48,3 +50,16 @@ function drawCenteredRotatingBitMap(pic, picX, picY, angle){
canvasContext.drawImage(pic, -pic.width/2, -pic.height/2);
canvasContext.restore();
}
//provisorische graphiken
function drawBall(ballX,ballY,ballRadius,ballColour){
canvasContext.fillStyle = ballColour;
canvasContext.beginPath();
canvasContext.arc(ballX, ballY, ballRadius, 0, 2*Math.PI, true);
canvasContext.fill();
}
function drawRectangle(X, Y, width, height, colour){
canvasContext.fillStyle = colour;
canvasContext.fillRect(X, Y, width, height);
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment