Library
Quick start guide
How can I just draw anything on a canvas?
All that you need is jCanvaScript library included in your html document. See the very simple example below.
<html>
<head>
<!--we include library here:-->
<script type="text/javascript" src="jCanvaScript.js"> </script>
<!--and here is our code:-->
<script type="text/javascript">
function simpleExample()
{
//initialization by canvas id
jc.start('canvas_1');
//than we can draw some object
//(see 'objects' in the left navigation menu)
jc.circle(100,100,50,'rgba(255,0,0,0.5)',1);
//we can create another object and use some function
//(see more in 'functions')
jc.rect(150,40,50,60,1)
.rotate(30,'center');
//and we need to redraw canvas in the end
jc.start('canvas_1');
}
</script>
<head>
<body onload="simpleExample()">
<canvas height="200" width="500" id="canvas_1"></canvas>
</body>
</html>
And what we have? You can see the result here: