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
04971bf84d0cd72ea4ee016234d6ebb7ec0fa5167c81f8b37ed75e6b7b673aab2ccd08e81e4bad2f5ba888ca0b26d50f30d16674d57655c9dc4dea6a6e641d7de6;Bubbit |
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> | |
<body> | |
<canvas id="canvas" width="800" height="400" style="border: 1px solid #333;"></canvas> | |
<script type="text/javascript"> | |
// Based on: | |
// http://www.html5canvastutorials.com/tutorials/html5-canvas-wrap-text-tutorial | |
CanvasRenderingContext2D.prototype.textLines = function(x, y, w, h, text, | |
hard_wrap) { | |
var ctx = this; |