Team:Acton-BoxboroughRHS/Simulations

From 2014hs.igem.org

(Difference between revisions)
Line 123: Line 123:
         <p style="font-size:12px;font-family:Arial">Note that this is test JavaScript:</p>
         <p style="font-size:12px;font-family:Arial">Note that this is test JavaScript:</p>
         <br></br>
         <br></br>
-
 
+
   
-
        <canvas id ="p_canvas" height="500" width="500"></canvas>
+
      <canvas id="myCanvas" width="300" height="150" style="border:1px solid #d3d3d3;">
 +
Your browser does not support the HTML5 canvas tag.</canvas>
         <script>
         <script>
-
         var pc=document.getElementById("p_canvas");
+
         var c=document.getElementById("myCanvas");
-
         var ctx=pc.getContext("2d");
+
         var ctx=c.getContext("2d");
-
        pc.width=500;
+
-
        pc.height=500;
+
-
+
        // Red rectangle
         ctx.beginPath();
         ctx.beginPath();
         ctx.lineWidth="6"
         ctx.lineWidth="6"
         ctx.strokeStyle="black";           
         ctx.strokeStyle="black";           
-
         ctx.rect(0,0, canvas.width, canvas.height)
+
         ctx.rect(0,0, 50, 50)
         ctx.stroke();
         ctx.stroke();
 +
        // Green rectangle
 +
        ctx.beginPath();
 +
        ctx.lineWidth="4";
         ctx.strokeStyle="green";
         ctx.strokeStyle="green";
 +
        ctx.rect(30,30,50,50);
 +
        ctx.stroke();
 +
 +
        // Blue rectangle
         ctx.beginPath();
         ctx.beginPath();
-
         ctx.arc(100,75,50,0,2*Math.PI);
+
         ctx.lineWidth="10";
 +
        ctx.strokeStyle="blue";
 +
        ctx.rect(50,50,150,80);
         ctx.stroke();
         ctx.stroke();
-
        ctx.closePath();
 
         </script>
         </script>

Revision as of 02:00, 26 May 2014

Welcome to the ABRHS iGEM team

ABRHS
Simulations

Note that this is test JavaScript:



Your browser does not support the HTML5 canvas tag.

Message