Created
February 1, 2018 17:37
-
-
Save HectorBlisS/16448303cc1f0abc9272d86d768e05fb to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/doveco
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"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<canvas id="canvas"></canvas> | |
<script id="jsbin-javascript"> | |
var canvas = document.getElementById("canvas"); | |
var ctx = canvas.getContext("2d"); | |
canvas.width = 400; | |
canvas.height = 400; | |
ctx.beginPath(); | |
ctx.moveTo(0,0); | |
ctx.lineTo(50,0); | |
ctx.lineTo(50,100); | |
ctx.stroke(); | |
ctx.closePath(); | |
ctx.beginPath(); | |
ctx.lineWidth = 20; | |
ctx.arc(250, 75, 40, 0, Math.PI*1.5,true); | |
ctx.stroke(); | |
function drawX(x){ | |
ctx.beginPath(); | |
ctx.moveTo(x,0); | |
ctx.lineTo(x + 60,100); | |
ctx.moveTo(x + 60,0); | |
ctx.lineTo(x,100); | |
ctx.stroke(); | |
ctx.closePath(); | |
} | |
drawX(50); | |
drawX(150); | |
ctx.lineWidth = 4; | |
ctx.strokeStyle = "red"; | |
ctx.font = "40px arial" | |
ctx.strokeText("BlisS", 200,200); | |
ctx.fillStyle = "orange"; | |
ctx.fillText("BlisS", 200,200); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">var canvas = document.getElementById("canvas"); | |
var ctx = canvas.getContext("2d"); | |
canvas.width = 400; | |
canvas.height = 400; | |
ctx.beginPath(); | |
ctx.moveTo(0,0); | |
ctx.lineTo(50,0); | |
ctx.lineTo(50,100); | |
ctx.stroke(); | |
ctx.closePath(); | |
ctx.beginPath(); | |
ctx.lineWidth = 20; | |
ctx.arc(250, 75, 40, 0, Math.PI*1.5,true); | |
ctx.stroke(); | |
function drawX(x){ | |
ctx.beginPath(); | |
ctx.moveTo(x,0); | |
ctx.lineTo(x + 60,100); | |
ctx.moveTo(x + 60,0); | |
ctx.lineTo(x,100); | |
ctx.stroke(); | |
ctx.closePath(); | |
} | |
drawX(50); | |
drawX(150); | |
ctx.lineWidth = 4; | |
ctx.strokeStyle = "red"; | |
ctx.font = "40px arial" | |
ctx.strokeText("BlisS", 200,200); | |
ctx.fillStyle = "orange"; | |
ctx.fillText("BlisS", 200,200); | |
</script></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
var canvas = document.getElementById("canvas"); | |
var ctx = canvas.getContext("2d"); | |
canvas.width = 400; | |
canvas.height = 400; | |
ctx.beginPath(); | |
ctx.moveTo(0,0); | |
ctx.lineTo(50,0); | |
ctx.lineTo(50,100); | |
ctx.stroke(); | |
ctx.closePath(); | |
ctx.beginPath(); | |
ctx.lineWidth = 20; | |
ctx.arc(250, 75, 40, 0, Math.PI*1.5,true); | |
ctx.stroke(); | |
function drawX(x){ | |
ctx.beginPath(); | |
ctx.moveTo(x,0); | |
ctx.lineTo(x + 60,100); | |
ctx.moveTo(x + 60,0); | |
ctx.lineTo(x,100); | |
ctx.stroke(); | |
ctx.closePath(); | |
} | |
drawX(50); | |
drawX(150); | |
ctx.lineWidth = 4; | |
ctx.strokeStyle = "red"; | |
ctx.font = "40px arial" | |
ctx.strokeText("BlisS", 200,200); | |
ctx.fillStyle = "orange"; | |
ctx.fillText("BlisS", 200,200); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment