This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function () { | |
//Code here | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
context.save(); | |
// rotate the context to draw at an angle | |
// the rotation is in radians | |
var degrees = 55; | |
context.rotate(degrees * 0.01745); | |
context.fillText("Main St", 150, -165); | |
// restore the context |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
context.beginPath(); | |
context.lineWidth = 10; | |
context.fillStyle = "blue"; | |
context.arc(305, 135, 10, 0, 360); | |
context.fill(); | |
context.stroke(); | |
context.closePath(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
context.fillRect(25,25,100,100); | |
context.clearRect(45,45,60,60); | |
context.strokeRect(50,50,50,50); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Example document</title> | |
</head> | |
<body> | |
<p>Example paragraph</p> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>Example document</title> | |
</head> | |
<body> | |
<p>Example paragraph</p> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<title>SVG in text/html</title> | |
<p> | |
A green circle: | |
<svg> <circle r="50" cx="50" cy="50" fill="green"/> </svg> | |
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<figure> | |
<video src="example.webm" controls></video> | |
<figcaption>Example</figcaption> | |
</figure> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<script> | |
window.onload = function() { | |
var canvas = document.getElementById("myCanvas"); | |
var context = canvas.getContext("2d"); | |
// Write on the canvas here | |
context.moveTo(100, 150); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body> | |
<canvas id="myCanvas" width="578" height="200"></canvas> | |
</body> |