Last active
January 3, 2016 05:59
-
-
Save ondrek/8419662 to your computer and use it in GitHub Desktop.
JSFiddle Gist
This file contains hidden or 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
canvas { margin: 20px; } |
This file contains hidden or 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
<canvas width="500" height="400"></canvas> |
This file contains hidden or 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.querySelector("canvas"); | |
var ctx = canvas.getContext("2d"); | |
ctx.strokeStyle = "#eee"; | |
ctx.stroke(); | |
ctx.font = "bold 15px sans-serif"; | |
ctx.fillText("test", 0, 160); |
This file contains hidden or 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
name: CanvasText Demo | |
description: Demo how to works with Canvas and Text | |
authors: | |
- Samuel Ondrek | |
resources: | |
- /css/normalize.css | |
normalize_css: yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment