|
| 1 | +<!doctype html> |
| 2 | +<!-- |
| 3 | +/** |
| 4 | + * jsPDF Context2d PlugIn |
| 5 | + * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv |
| 6 | + * |
| 7 | + * Licensed under the MIT License. |
| 8 | + * http://opensource.org/licenses/mit-license |
| 9 | + */ |
| 10 | +--> |
| 11 | + |
| 12 | +<html> |
| 13 | +<head> |
| 14 | +<meta http-equiv="content-type" content="text/html; charset=UTF-8"> |
| 15 | + |
| 16 | +<title>Context2D Paths Test</title> |
| 17 | + |
| 18 | +<script src='../../libs/require/require.js'></script> |
| 19 | + |
| 20 | +<script> |
| 21 | + require_baseUrl_override = '../../'; |
| 22 | + require(['../../libs/require/config'], function(){ |
| 23 | + require(['jspdf.plugin.context2d', 'examples/js/test_harness'], function(){ |
| 24 | + |
| 25 | + var pdf = new jsPDF('p', 'pt', 'letter'); |
| 26 | + var context = pdf.context2d; |
| 27 | + |
| 28 | + context.beginPath(); |
| 29 | + context.arc(150,150,50,0,Math.PI, false); |
| 30 | + context.lineTo(300,300); |
| 31 | + //context.moveTo(300,150); |
| 32 | + //context.rect(5,5,150,150); |
| 33 | + //context.arc(150,150,50,0,Math.PI, false); |
| 34 | + context.stroke(); |
| 35 | + |
| 36 | + context.fillStyle = 'red'; |
| 37 | + context.fillRect(545,205,50,40); |
| 38 | + |
| 39 | + pdf_test_harness_init(pdf); |
| 40 | + |
| 41 | + |
| 42 | + }); // require |
| 43 | + }); // require |
| 44 | + |
| 45 | +</script> |
| 46 | + |
| 47 | +</head> |
| 48 | + |
| 49 | +<body style='background-color: silver; margin: 0;'> |
| 50 | +</body> |
| 51 | +</html> |
0 commit comments