View Single Post
Old 12-09-2012, 11:35 PM   PM User | #6
hdewantara
Regular Coder

 
hdewantara's Avatar
 
Join Date: Aug 2009
Location: Jakarta, Indonesia.
Posts: 287
Thanks: 4
Thanked 39 Times in 39 Posts
hdewantara is an unknown quantity at this point
Is it something like the following?
PHP Code:
    function strok(){
        
O=document.getElementById('Q');
        var 
ctx=O.getContext("2d");
        
        
ctx.fillStyle'#996633';
        
ctx.strokeStyle '#cc6633';
        
ctx.lineWidth   4;
        
ctx.beginPath();
        
        
//start drawing COUNTER-CLOCKWISE.
        
ctx.moveTo(2,400);     //top-left corner
        
ctx.lineTo(700,400); //the left surface
        
ctx.lineTo(900,650); //entrance floor
        
ctx.lineTo(1300,650); //hole floor

        
ctx.bezierCurveTo(1300,650,1360,6001355550); //curved cave ceiling
        
ctx.bezierCurveTo(1355,55013455001325470);
        
ctx.bezierCurveTo(1325,47012003801020480);
        
ctx.bezierCurveTo(1020,4801000520,975,570);

        
ctx.lineTo(850,400);    //straight cave ceiling, back to the surface
        
ctx.lineTo(1375,400);    //the right surface
        
ctx.lineTo(1375,715); //to bottom-right corner
        
ctx.lineTo(2,715);     //to bottom-left corner

        
ctx.closePath();
        
ctx.fill();
        
ctx.stroke();
    } 
hdewantara is offline   Reply With Quote