scrawl-canvas
Version:
Version 8.9.4 - 19 Nov 2022
54 lines (41 loc) • 1.98 kB
HTML
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Demo Canvas 015</title>
<link href="css/normalize.css" rel="stylesheet" />
<link href="css/tests.css" rel="stylesheet" />
</head>
<body>
<h1><a href="index.html">Scrawl-canvas v8</a> - Canvas test 015</h1>
<h2>Phrase entity (make, clone, method, multiline)</h2>
<canvas
id="mycanvas"
width="650"
height="300"
data-scrawl-canvas
data-base-background-color="aliceblue"
></canvas>
<p id="reportmessage"></p>
<div class="testinfo">
<h4>Test purpose</h4>
<ul>
<li>Create a phrase entity</li>
<li>Clone a phrase</li>
<li>Position the phrase on the canvas</li>
<li>Change the state of a subset of phrases sharing the same state object</li>
<li>Check the various drawing methods available to the phrase</li>
</ul>
<ul>
<li>Kill and resurrect several entitys to make sure they remove themselves entirely from the Scrawl-canvas system, and cleanly recreate themselves from saved packets</li>
</ul>
<p><b>Note 1:</b> this Demo will appear differently on webkit-based (for example: Safari) and other browsers because webkit engines have difficulty understanding font strings that include a bold keyword. To achieve boldness in these browsers, use a font face that already has boldness applied to it.</p>
<p><b>Note 2:</b> known issue - in some browsers (for instance, Firefox) the render speed will degrade significantly when applying shadows (in particular: shadowBlur) to Phrase entitys.</p>
<p><b>Touch test:</b> should work as expected - though flicking a text may lead to it moving beyond the canvas border and out of sight!</p>
<p><a href="../docs/demo/canvas-015.html">Annotated code</a></p>
</div>
<script src="canvas-015.js" type="module"></script>
</body>
</html>