Last change
on this file since 28914 was 28914, checked in by ak19, 10 years ago |
Supporting javascript libraries and bespoke code written by Steffan to support the von-sparql user interface
|
File size:
1.1 KB
|
Line | |
---|
1 | <!DOCTYPE html>
|
---|
2 | <html>
|
---|
3 | <head>
|
---|
4 | <meta charset="UTF-8">
|
---|
5 | <title>Text Testing</title>
|
---|
6 | <link rel="stylesheet" href="../css/style.css">
|
---|
7 | <script type="text/javascript" src="../../dist/paper.js"></script>
|
---|
8 | <script type="text/paperscript" canvas="canvas">
|
---|
9 | var text = new PointText(new Point(50, 100));
|
---|
10 | text.fillColor = 'black';
|
---|
11 | text.content = 'This is a test';
|
---|
12 |
|
---|
13 | var text = new PointText(new Point(100, 150));
|
---|
14 | text.fillColor = 'red';
|
---|
15 | text.strokeWidth = '4';
|
---|
16 | text.content = 'This is also a test';
|
---|
17 | /*
|
---|
18 | text.scale(5);
|
---|
19 | text.translate(15, 15);
|
---|
20 | text.rotate(20);
|
---|
21 | text.shear(20, 5);
|
---|
22 | */
|
---|
23 | text.rotate(45);
|
---|
24 | text.shear(.85, .15);
|
---|
25 | text.scale(.85, 2);
|
---|
26 |
|
---|
27 | var path2 = new Path.Circle(new Point(100, 100), 50);
|
---|
28 | path2.strokeColor = 'black';
|
---|
29 | path2.shear(.5, .5);
|
---|
30 | colors = ['red', 'blue', 'green', 'orange'];
|
---|
31 | for (var i in path2.segments) {
|
---|
32 | var p = path2.segments[i].point;
|
---|
33 | var c = new Path.Circle(p, 2);
|
---|
34 | c.fillColor = colors[i];
|
---|
35 | }
|
---|
36 |
|
---|
37 | document.getElementById('svg').appendChild(project.exportSVG());
|
---|
38 | </script>
|
---|
39 | </head>
|
---|
40 | <body>
|
---|
41 | <canvas id="canvas" width="500" height="500"></canvas>
|
---|
42 | <svg id="svg" width="500" height="500"></svg>
|
---|
43 | </body>
|
---|
44 | </html> |
---|
Note:
See
TracBrowser
for help on using the repository browser.