mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 10:48:38 -05:00
46 lines
No EOL
2.7 KiB
HTML
46 lines
No EOL
2.7 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
|
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<title>Example</title>
|
|
<script type="text/javascript" src="../src/Bootstrap.js"></script>
|
|
<script type="text/javascript" src="../src/Item.js"></script>
|
|
<script type="text/javascript" src="../src/PathItem.js"></script>
|
|
<script type="text/javascript" src="../src/Point.js"></script>
|
|
<script type="text/javascript" src="../src/Rectangle.js"></script>
|
|
<script type="text/javascript" src="../src/Size.js"></script>
|
|
<script type="text/javascript" src="../src/Segment.js"></script>
|
|
<script type="text/javascript" src="../src/PathItem.js"></script>
|
|
<script type="text/javascript" src="../src/Path.js"></script>
|
|
<script type="text/javascript" src="../src/Doc.js"></script>
|
|
<script>
|
|
window.onload = function() {
|
|
var canvas = document.getElementById('canvas');
|
|
var doc = new Doc(canvas);
|
|
|
|
var letterPath = new Path(
|
|
new Segment(new Point(63.39306640625, 265.7138671875), null, new Point(10.86669921875, 6.96630859375)),
|
|
new Segment(new Point(106.58203125, 277.97412109375), new Point(-16.71826171875, 0), new Point(24.79931640625, 0)),
|
|
new Segment(new Point(145.87060546875, 245.9306640625), new Point(0, 18.947265625), new Point(0, -17.27587890625)),
|
|
new Segment(new Point(110.4833984375, 208.87158203125), new Point(25.35595703125, 9.4736328125), new Point(-30.65087890625, -11.14599609375)),
|
|
new Segment(new Point(60.88525390625, 155.37255859375), new Point(0, 26.19189453125), new Point(0, -29.25732421875)),
|
|
new Segment(new Point(121.62890625, 104.380859375), new Point(-36.501953125, 0), new Point(18.947265625, 0)),
|
|
new Segment(new Point(162.86767578125, 113.576171875), new Point(-8.08056640625, -4.73681640625)),
|
|
new Segment(new Point(156.18017578125, 133.35986328125), null, new Point(-5.8515625, -3.62255859375)),
|
|
new Segment(new Point(120.79296875, 124.443359375), new Point(16.9970703125, 0), new Point(-25.63525390625, 0)),
|
|
new Segment(new Point(85.4052734375, 152.5859375), new Point(0, -12.8173828125), new Point(0, 17.55419921875)),
|
|
new Segment(new Point(122.7431640625, 188.80908203125), new Point(-25.91357421875, -10.03076171875), new Point(31.76513671875, 12.26025390625)),
|
|
new Segment(new Point(170.39111328125, 243.97998046875), new Point(0, -27.58544921875), new Point(0, 28.97900390625)),
|
|
new Segment(new Point(104.91015625, 298.31494140625), new Point(44.30419921875, 0), new Point(-18.111328125, 0)),
|
|
new Segment(new Point(56.984375, 286.0546875), new Point(10.03076171875, 6.6875))
|
|
);
|
|
letterPath.fillColor = 'black';
|
|
doc.children.push(letterPath);
|
|
doc.draw();
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<canvas id='canvas' width=1024 height=768></canvas>
|
|
</body> |