UNPKG

scrawl-canvas

Version:
77 lines (65 loc) 2.51 kB
<!DOCTYPE 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 029</title> <link href="css/normalize.css" rel="stylesheet" /> <link href="css/tests.css" rel="stylesheet" /> <!-- Test to include a Google Fonts webfont in the canvas --> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Mountains+of+Christmas:bold"> <style type="text/css"> #display-controls { margin-top: 1rem; margin-bottom: 1rem; font-family: monospace; } </style> </head> <body> <h1><a href="index.html">Scrawl-canvas v8</a> - Canvas test 029</h1> <h2>Phrase entitys and gradients</h2> <div id="display-controls"> <p>Select gradient direction: <select class="control-item" id="gradient"> <option value="horizontal">Horizontal</option> <option value="diagonal">Diagonal</option> <option value="vertical">Vertical</option> </select> </p> <p>Select text justification: <select class="control-item" id="justify"> <option value="left">Left</option> <option value="center">Center</option> <option value="right">Right</option> <option value="full">Full</option> </select> </p> </div> <canvas id="mycanvas" width="600" height="400" data-scrawl-canvas data-base-background-color="lightgray" ></canvas> <p id="reportmessage"></p> <div class="testinfo"> <h4>Test purpose</h4> <ul> <li>Create a linear gradient</li> <li>Create several Phrase objects</li> <li>Position some with relative coordinates</li> <li>Create a Shape entity and position one of the phrases on it with 'path' (delta animated)</li> <li>Check that the gradient appears as expected when it is vertical (top-bottom)</li> <li>Check that the gradient appears as expected when it is horizontal (left-right)</li> <li>Check that the gradient appears as expected for both cell-locked and entity-locked gradients</li> </ul> <p><b>Known issues:</b> this Demo is excessively slow in Webkit-based browsers (for instance: Safari); text out of place in Samsung browser (Phrase cloning width issues?)</p> <p><b>Touch test:</b> not required</p> <p><a href="../docs/demo/canvas-029.html">Annotated code</a></p> </div> <script src="canvas-029.js" type="module"></script> </body> </html>