Update examples.

This commit is contained in:
Jonathan Puckey 2011-02-20 23:28:38 +01:00
parent 51ab66b0f8
commit e772038727
20 changed files with 223 additions and 75 deletions

View file

@ -14,7 +14,9 @@
<script type="text/javascript" src="../../src/basic/Size.js"></script> <script type="text/javascript" src="../../src/basic/Size.js"></script>
<script type="text/javascript" src="../../src/basic/Matrix.js"></script> <script type="text/javascript" src="../../src/basic/Matrix.js"></script>
<script type="text/javascript" src="../../src/document/Doc.js"></script> <script type="text/javascript" src="../../src/document/Doc.js"></script>
<script type="text/javascript" src="../../src/document/Symbol.js"></script>
<script type="text/javascript" src="../../src/item/Item.js"></script> <script type="text/javascript" src="../../src/item/Item.js"></script>
<script type="text/javascript" src="../../src/item/PlacedSymbol.js"></script>
<script type="text/javascript" src="../../src/item/Group.js"></script> <script type="text/javascript" src="../../src/item/Group.js"></script>
<script type="text/javascript" src="../../src/item/Layer.js"></script> <script type="text/javascript" src="../../src/item/Layer.js"></script>
<script type="text/javascript" src="../../src/item/PathStyle.js"></script> <script type="text/javascript" src="../../src/item/PathStyle.js"></script>

View file

@ -14,7 +14,9 @@
<script type="text/javascript" src="../../src/basic/Size.js"></script> <script type="text/javascript" src="../../src/basic/Size.js"></script>
<script type="text/javascript" src="../../src/basic/Matrix.js"></script> <script type="text/javascript" src="../../src/basic/Matrix.js"></script>
<script type="text/javascript" src="../../src/document/Doc.js"></script> <script type="text/javascript" src="../../src/document/Doc.js"></script>
<script type="text/javascript" src="../../src/document/Symbol.js"></script>
<script type="text/javascript" src="../../src/item/Item.js"></script> <script type="text/javascript" src="../../src/item/Item.js"></script>
<script type="text/javascript" src="../../src/item/PlacedSymbol.js"></script>
<script type="text/javascript" src="../../src/item/Group.js"></script> <script type="text/javascript" src="../../src/item/Group.js"></script>
<script type="text/javascript" src="../../src/item/Layer.js"></script> <script type="text/javascript" src="../../src/item/Layer.js"></script>
<script type="text/javascript" src="../../src/item/PathStyle.js"></script> <script type="text/javascript" src="../../src/item/PathStyle.js"></script>
@ -25,22 +27,26 @@
<script type="text/javascript" src="../../src/color/Color.js"></script> <script type="text/javascript" src="../../src/color/Color.js"></script>
<script type="text/javascript" src="../../src/color/RGBColor.js"></script> <script type="text/javascript" src="../../src/color/RGBColor.js"></script>
<script type="text/javascript" src="../../src/color/GrayColor.js"></script> <script type="text/javascript" src="../../src/color/GrayColor.js"></script>
<script type="text/javascript" src="../../src/color/GradientColor.js"></script>
<script type="text/javascript" src="../../src/color/Gradient.js"></script>
<script type="text/javascript" src="../../src/color/GradientStop.js"></script>
<script> <script>
var doc, mousePoint, amount = 25;
var count = 0, paths = [];
var colors = ['red', 'white', 'blue', 'white'];
window.onload = function() { window.onload = function() {
var canvas = document.getElementById('canvas'); var canvas = document.getElementById('canvas');
doc = new Doc(canvas); var doc = new Doc(canvas);
mousePoint = doc.size.divide(2); var mousePoint = new Point(doc.size.divide(2));
var amount = 25;
var colors = ['red', 'white', 'blue', 'white'];
for (var i = 0; i < amount; i++) { for (var i = 0; i < amount; i++) {
var rect = new Rectangle([0, 0], [25, 25]); var rect = new Rectangle([0, 0], [25, 25]);
rect.center = mousePoint; rect.center = mousePoint;
var path = new Path.RoundRectangle(rect, 6); var path = new Path.RoundRectangle(rect, 6);
path.fillColor = colors[i % 4]; path.fillColor = colors[i % 4];
var scale = (1 - i / amount) * 20; var scale = (1 - i / amount) * 20;
path.scale(scale, scale); path.scale(scale);
paths.push(path); new PlacedSymbol(path);
} }
setInterval(draw, 30); setInterval(draw, 30);
@ -48,19 +54,21 @@
onMouseDrag: function(event) { onMouseDrag: function(event) {
mousePoint = event.point; mousePoint = event.point;
} }
}) });
}
var children = Paper.document.activeLayer.children;
function draw() { var count = 0;
count++; function draw() {
for (var i = 0; i < amount; i++) { count++;
var path = paths[i]; for (var i = 0, l = children.length; i < l; i++) {
path.rotate(Math.sin((count + i) / 10) * 3); var item = children[i];
var position = path.position; var delta = mousePoint.subtract(item.position).divide(i + 1);
var delta = mousePoint.subtract(position); item.rotate(Math.sin((count + i) / 10) * 7);
path.position = position.add(delta.divide(i)); if(delta.length > 0.1)
item.translate(delta);
}
doc.redraw();
} }
doc.redraw();
} }
</script> </script>
</head> </head>

View file

@ -14,7 +14,9 @@
<script type="text/javascript" src="../../src/basic/Size.js"></script> <script type="text/javascript" src="../../src/basic/Size.js"></script>
<script type="text/javascript" src="../../src/basic/Matrix.js"></script> <script type="text/javascript" src="../../src/basic/Matrix.js"></script>
<script type="text/javascript" src="../../src/document/Doc.js"></script> <script type="text/javascript" src="../../src/document/Doc.js"></script>
<script type="text/javascript" src="../../src/document/Symbol.js"></script>
<script type="text/javascript" src="../../src/item/Item.js"></script> <script type="text/javascript" src="../../src/item/Item.js"></script>
<script type="text/javascript" src="../../src/item/PlacedSymbol.js"></script>
<script type="text/javascript" src="../../src/item/Group.js"></script> <script type="text/javascript" src="../../src/item/Group.js"></script>
<script type="text/javascript" src="../../src/item/Layer.js"></script> <script type="text/javascript" src="../../src/item/Layer.js"></script>
<script type="text/javascript" src="../../src/item/PathStyle.js"></script> <script type="text/javascript" src="../../src/item/PathStyle.js"></script>
@ -25,34 +27,51 @@
<script type="text/javascript" src="../../src/color/Color.js"></script> <script type="text/javascript" src="../../src/color/Color.js"></script>
<script type="text/javascript" src="../../src/color/RGBColor.js"></script> <script type="text/javascript" src="../../src/color/RGBColor.js"></script>
<script type="text/javascript" src="../../src/color/GrayColor.js"></script> <script type="text/javascript" src="../../src/color/GrayColor.js"></script>
<script type="text/javascript" src="../../src/color/GradientColor.js"></script>
<script type="text/javascript" src="../../src/color/Gradient.js"></script>
<script type="text/javascript" src="../../src/color/GradientStop.js"></script>
<script> <script>
var canvas, doc;
var count = 0;
window.onload = function() { window.onload = function() {
canvas = document.getElementById('canvas'); var canvas = document.getElementById('canvas');
doc = new Doc(canvas); var doc = new Doc(canvas);
setInterval(draw, 60); var layer = doc.activeLayer;
}
var values = {
function draw() { count: 34,
count++; points: 32
doc.activeLayer.children = []; }
var point = new Point(1024, 768).divide(2);
for (var i = 0; i < 35; i++) { var center = new Point(doc.size).divide(2)
var vector = new Point(20 + 10 * i, 0).rotate(i * (360 / 35 * 2) * Math.sin(count / 150)); for (var i = 0; i < values.count; i++) {
var l = vector.length; var offset = new Point(20 + 10 * i, 0);
var path = new Path(); var path = new Path();
path.fillColor = i % 2 ? 'red' : 'black'; path.fillColor = i % 2 ? 'red' : 'black';
path.closed = true; path.closed = true;
for (var j = 0; j < 32; j++) {
vector = vector.rotate(45 / 4); var l = offset.length;
var newPoint = point.add(vector).add(vector.rotate(-180).normalize(l * (j % 2 ? 0.1 : -0.1))); for (var j = 0; j < values.points * 2; j++) {
path.add(newPoint); offset.angle += 360 / values.points;
var vector = offset.clone()
vector.length = l * (j % 2 ? 0.1 : -0.1);
path.add(offset.add(vector));
} }
path.smooth(); path.smooth();
var placedSymbol = new PlacedSymbol(path);
placedSymbol.position = center;
layer.appendBottom(placedSymbol);
}
setInterval(draw, 30);
var count = 0;
function draw() {
count++;
for (var i = 0, l = layer.children.length; i < l; i++) {
var item = layer.children[i];
var angle = (values.count - i) * Math.sin(count / 128) / 10;
item.rotate(angle);
}
doc.redraw();
} }
doc.activeLayer.children.reverse();
doc.redraw();
} }
</script> </script>
</head> </head>

View file

@ -14,7 +14,9 @@
<script type="text/javascript" src="../../src/basic/Size.js"></script> <script type="text/javascript" src="../../src/basic/Size.js"></script>
<script type="text/javascript" src="../../src/basic/Matrix.js"></script> <script type="text/javascript" src="../../src/basic/Matrix.js"></script>
<script type="text/javascript" src="../../src/document/Doc.js"></script> <script type="text/javascript" src="../../src/document/Doc.js"></script>
<script type="text/javascript" src="../../src/document/Symbol.js"></script>
<script type="text/javascript" src="../../src/item/Item.js"></script> <script type="text/javascript" src="../../src/item/Item.js"></script>
<script type="text/javascript" src="../../src/item/PlacedSymbol.js"></script>
<script type="text/javascript" src="../../src/item/Group.js"></script> <script type="text/javascript" src="../../src/item/Group.js"></script>
<script type="text/javascript" src="../../src/item/Layer.js"></script> <script type="text/javascript" src="../../src/item/Layer.js"></script>
<script type="text/javascript" src="../../src/item/PathStyle.js"></script> <script type="text/javascript" src="../../src/item/PathStyle.js"></script>
@ -25,45 +27,83 @@
<script type="text/javascript" src="../../src/color/Color.js"></script> <script type="text/javascript" src="../../src/color/Color.js"></script>
<script type="text/javascript" src="../../src/color/RGBColor.js"></script> <script type="text/javascript" src="../../src/color/RGBColor.js"></script>
<script type="text/javascript" src="../../src/color/GrayColor.js"></script> <script type="text/javascript" src="../../src/color/GrayColor.js"></script>
<script type="text/javascript" src="../../src/color/GradientColor.js"></script>
<script type="text/javascript" src="../../src/color/Gradient.js"></script>
<script type="text/javascript" src="../../src/color/GradientStop.js"></script>
<script type="text/javascript" src="../../src/color/GradientColor.js"></script>
<script type="text/javascript" src="../../src/color/Gradient.js"></script>
<script type="text/javascript" src="../../src/color/GradientStop.js"></script>
<script type="text/javascript" src="../../src/document/Symbol.js"></script>
<script type="text/javascript" src="../../src/item/PlacedSymbol.js"></script>
<script> <script>
var count = 0, balls = [];
var ball;
var doc, amount = 50, group;
window.onload = function() { window.onload = function() {
var canvas = document.getElementById('canvas');
var doc = new Doc(canvas);
var balls = [];
var circlePath = new Path.Circle([0, 0], 10);
circlePath.fillColor = new GradientColor(null, [0, 0], [0, 12], [0, 2]);
circlePath.fillColor.gradient.type = 'radial';
var symbol = new Symbol(circlePath);
var group = new Group();
var Ball = Base.extend({ var Ball = Base.extend({
initialize: function(point, vector) { initialize: function(point, vector) {
this.vector = vector; if (vector.isZero()) {
this.vector = Point.random().multiply(5);
} else {
this.vector = vector;
}
this.point = point; this.point = point;
this.dampen = 0.4; this.dampen = 0.4;
this.gravity = 3; this.gravity = 3;
this.bounce = -0.8; this.bounce = -0.6;
this.radius = 50 * Math.random() + 10; this.radius = 50 * Math.random() + 10;
this.path = new Path.Circle(this.point, this.radius); this.item = new PlacedSymbol(symbol);
this.path.fillColor = 'black'; this.item.position = point;
this.path.strokeColor = 'white'; this.item.scale(this.radius / 10);
this.path.strokeWidth = 3; group.appendTop(this.item);
group.appendTop(this.path);
}, },
contrainPoint: function() {
var x = this.point.x;
var y = this.point.y;
var radius = this.radius;
this.point.x = Math.min(Math.max(radius, x), doc.size.width - radius);
this.point.y = Math.min(Math.max(radius, y), doc.size.height - radius);
},
iterate: function() { iterate: function() {
this.vector.y += this.gravity; this.vector.y += this.gravity;
this.vector.x *= 0.99;
var pre = this.point.add(this.vector); var pre = this.point.add(this.vector);
if(pre.x < this.radius || pre.x > doc.size.width - this.radius) if (pre.x < this.radius || pre.x > doc.size.width - this.radius)
this.vector.x *= -this.dampen; this.vector.x *= -this.dampen;
if(pre.y < this.radius || pre.y > doc.size.height - this.radius) if (pre.y < this.radius || pre.y > doc.size.height - this.radius) {
if(Math.abs(this.vector.x) < 3) {
this.vector.x = Math.random() * 150 - 75;
this.vector.y = Math.random() * 100 + 20;
}
this.vector.y *= this.bounce; this.vector.y *= this.bounce;
this.point = this.point.add(this.vector);
if(Math.abs(this.vector.x) < 3) {
this.vector.x = Math.random() * 100 - 50;
this.vector.y = Math.random() * 50;
} }
this.path.position = this.point; this.point = this.point.add(this.vector);
this.contrainPoint();
this.item.position = this.point;
} }
}); });
var canvas = document.getElementById('canvas'); for(var i = 0; i < 10; i++) {
doc = new Doc(canvas); var position = Point.random().multiply(doc.size);
group = new Group(); var vector = Point.random().subtract(0.5, 0).multiply(50, 100);
var ball = new Ball(position, vector);
balls.push(ball);
}
var lastPoint; var lastPoint;
tool = new Tool({ tool = new Tool({
onMouseDown: function(event) { onMouseDown: function(event) {
@ -73,23 +113,22 @@
lastPoint = event.point; lastPoint = event.point;
}, },
onMouseUp: function(event) { onMouseUp: function(event) {
balls.push(new Ball(event.point, lastPoint.subtract(event.point))); var delta = lastPoint.subtract(event.point);
var ball = new Ball(event.point, delta);
balls.push(ball);
} }
}); });
setInterval(draw, 30); setInterval(draw, 30);
}
var boundPath; var boundPath = new Path.Rectangle([-10, -10], [-11, -11]);
function draw() { boundPath.strokeColor = 'red';
for (var i = 0, l = balls.length; i < l; i++) { boundPath.strokeWidth = 1;
balls[i].iterate();
} function draw() {
if(balls.length) { for (var i = 0, l = balls.length; i < l; i++) {
if(boundPath) balls[i].iterate();
boundPath.remove(); }
boundPath = new Path.Rectangle(group.bounds); boundPath.bounds = group.bounds;
boundPath.strokeColor = 'black';
boundPath.strokeWidth = 5;
boundPath.strokeCap = 'round';
doc.redraw(); doc.redraw();
} }
} }

View file

@ -14,7 +14,9 @@
<script type="text/javascript" src="../../src/basic/Size.js"></script> <script type="text/javascript" src="../../src/basic/Size.js"></script>
<script type="text/javascript" src="../../src/basic/Matrix.js"></script> <script type="text/javascript" src="../../src/basic/Matrix.js"></script>
<script type="text/javascript" src="../../src/document/Doc.js"></script> <script type="text/javascript" src="../../src/document/Doc.js"></script>
<script type="text/javascript" src="../../src/document/Symbol.js"></script>
<script type="text/javascript" src="../../src/item/Item.js"></script> <script type="text/javascript" src="../../src/item/Item.js"></script>
<script type="text/javascript" src="../../src/item/PlacedSymbol.js"></script>
<script type="text/javascript" src="../../src/item/Group.js"></script> <script type="text/javascript" src="../../src/item/Group.js"></script>
<script type="text/javascript" src="../../src/item/Layer.js"></script> <script type="text/javascript" src="../../src/item/Layer.js"></script>
<script type="text/javascript" src="../../src/item/PathStyle.js"></script> <script type="text/javascript" src="../../src/item/PathStyle.js"></script>
@ -25,6 +27,9 @@
<script type="text/javascript" src="../../src/color/Color.js"></script> <script type="text/javascript" src="../../src/color/Color.js"></script>
<script type="text/javascript" src="../../src/color/RGBColor.js"></script> <script type="text/javascript" src="../../src/color/RGBColor.js"></script>
<script type="text/javascript" src="../../src/color/GrayColor.js"></script> <script type="text/javascript" src="../../src/color/GrayColor.js"></script>
<script type="text/javascript" src="../../src/color/GradientColor.js"></script>
<script type="text/javascript" src="../../src/color/Gradient.js"></script>
<script type="text/javascript" src="../../src/color/GradientStop.js"></script>
<script> <script>
window.onload = function() { window.onload = function() {
var canvas = document.getElementById('canvas'); var canvas = document.getElementById('canvas');

View file

@ -14,7 +14,9 @@
<script type="text/javascript" src="../../src/basic/Size.js"></script> <script type="text/javascript" src="../../src/basic/Size.js"></script>
<script type="text/javascript" src="../../src/basic/Matrix.js"></script> <script type="text/javascript" src="../../src/basic/Matrix.js"></script>
<script type="text/javascript" src="../../src/document/Doc.js"></script> <script type="text/javascript" src="../../src/document/Doc.js"></script>
<script type="text/javascript" src="../../src/document/Symbol.js"></script>
<script type="text/javascript" src="../../src/item/Item.js"></script> <script type="text/javascript" src="../../src/item/Item.js"></script>
<script type="text/javascript" src="../../src/item/PlacedSymbol.js"></script>
<script type="text/javascript" src="../../src/item/Group.js"></script> <script type="text/javascript" src="../../src/item/Group.js"></script>
<script type="text/javascript" src="../../src/item/Layer.js"></script> <script type="text/javascript" src="../../src/item/Layer.js"></script>
<script type="text/javascript" src="../../src/item/PathStyle.js"></script> <script type="text/javascript" src="../../src/item/PathStyle.js"></script>
@ -25,6 +27,9 @@
<script type="text/javascript" src="../../src/color/Color.js"></script> <script type="text/javascript" src="../../src/color/Color.js"></script>
<script type="text/javascript" src="../../src/color/RGBColor.js"></script> <script type="text/javascript" src="../../src/color/RGBColor.js"></script>
<script type="text/javascript" src="../../src/color/GrayColor.js"></script> <script type="text/javascript" src="../../src/color/GrayColor.js"></script>
<script type="text/javascript" src="../../src/color/GradientColor.js"></script>
<script type="text/javascript" src="../../src/color/Gradient.js"></script>
<script type="text/javascript" src="../../src/color/GradientStop.js"></script>
<script> <script>
var count = 0; var count = 0;
var doc; var doc;

View file

@ -14,7 +14,9 @@
<script type="text/javascript" src="../../src/basic/Size.js"></script> <script type="text/javascript" src="../../src/basic/Size.js"></script>
<script type="text/javascript" src="../../src/basic/Matrix.js"></script> <script type="text/javascript" src="../../src/basic/Matrix.js"></script>
<script type="text/javascript" src="../../src/document/Doc.js"></script> <script type="text/javascript" src="../../src/document/Doc.js"></script>
<script type="text/javascript" src="../../src/document/Symbol.js"></script>
<script type="text/javascript" src="../../src/item/Item.js"></script> <script type="text/javascript" src="../../src/item/Item.js"></script>
<script type="text/javascript" src="../../src/item/PlacedSymbol.js"></script>
<script type="text/javascript" src="../../src/item/Group.js"></script> <script type="text/javascript" src="../../src/item/Group.js"></script>
<script type="text/javascript" src="../../src/item/Layer.js"></script> <script type="text/javascript" src="../../src/item/Layer.js"></script>
<script type="text/javascript" src="../../src/item/PathStyle.js"></script> <script type="text/javascript" src="../../src/item/PathStyle.js"></script>
@ -25,6 +27,9 @@
<script type="text/javascript" src="../../src/color/Color.js"></script> <script type="text/javascript" src="../../src/color/Color.js"></script>
<script type="text/javascript" src="../../src/color/RGBColor.js"></script> <script type="text/javascript" src="../../src/color/RGBColor.js"></script>
<script type="text/javascript" src="../../src/color/GrayColor.js"></script> <script type="text/javascript" src="../../src/color/GrayColor.js"></script>
<script type="text/javascript" src="../../src/color/GradientColor.js"></script>
<script type="text/javascript" src="../../src/color/Gradient.js"></script>
<script type="text/javascript" src="../../src/color/GradientStop.js"></script>
<script> <script>
window.onload = function() { window.onload = function() {
var canvas = document.getElementById('canvas'); var canvas = document.getElementById('canvas');

View file

@ -14,7 +14,9 @@
<script type="text/javascript" src="../../src/basic/Size.js"></script> <script type="text/javascript" src="../../src/basic/Size.js"></script>
<script type="text/javascript" src="../../src/basic/Matrix.js"></script> <script type="text/javascript" src="../../src/basic/Matrix.js"></script>
<script type="text/javascript" src="../../src/document/Doc.js"></script> <script type="text/javascript" src="../../src/document/Doc.js"></script>
<script type="text/javascript" src="../../src/document/Symbol.js"></script>
<script type="text/javascript" src="../../src/item/Item.js"></script> <script type="text/javascript" src="../../src/item/Item.js"></script>
<script type="text/javascript" src="../../src/item/PlacedSymbol.js"></script>
<script type="text/javascript" src="../../src/item/Group.js"></script> <script type="text/javascript" src="../../src/item/Group.js"></script>
<script type="text/javascript" src="../../src/item/Layer.js"></script> <script type="text/javascript" src="../../src/item/Layer.js"></script>
<script type="text/javascript" src="../../src/item/PathStyle.js"></script> <script type="text/javascript" src="../../src/item/PathStyle.js"></script>
@ -25,6 +27,9 @@
<script type="text/javascript" src="../../src/color/Color.js"></script> <script type="text/javascript" src="../../src/color/Color.js"></script>
<script type="text/javascript" src="../../src/color/RGBColor.js"></script> <script type="text/javascript" src="../../src/color/RGBColor.js"></script>
<script type="text/javascript" src="../../src/color/GrayColor.js"></script> <script type="text/javascript" src="../../src/color/GrayColor.js"></script>
<script type="text/javascript" src="../../src/color/GradientColor.js"></script>
<script type="text/javascript" src="../../src/color/Gradient.js"></script>
<script type="text/javascript" src="../../src/color/GradientStop.js"></script>
<script> <script>
var count = 0; var count = 0;
var doc; var doc;

View file

@ -14,7 +14,9 @@
<script type="text/javascript" src="../../src/basic/Size.js"></script> <script type="text/javascript" src="../../src/basic/Size.js"></script>
<script type="text/javascript" src="../../src/basic/Matrix.js"></script> <script type="text/javascript" src="../../src/basic/Matrix.js"></script>
<script type="text/javascript" src="../../src/document/Doc.js"></script> <script type="text/javascript" src="../../src/document/Doc.js"></script>
<script type="text/javascript" src="../../src/document/Symbol.js"></script>
<script type="text/javascript" src="../../src/item/Item.js"></script> <script type="text/javascript" src="../../src/item/Item.js"></script>
<script type="text/javascript" src="../../src/item/PlacedSymbol.js"></script>
<script type="text/javascript" src="../../src/item/Group.js"></script> <script type="text/javascript" src="../../src/item/Group.js"></script>
<script type="text/javascript" src="../../src/item/Layer.js"></script> <script type="text/javascript" src="../../src/item/Layer.js"></script>
<script type="text/javascript" src="../../src/item/PathStyle.js"></script> <script type="text/javascript" src="../../src/item/PathStyle.js"></script>
@ -25,6 +27,9 @@
<script type="text/javascript" src="../../src/color/Color.js"></script> <script type="text/javascript" src="../../src/color/Color.js"></script>
<script type="text/javascript" src="../../src/color/RGBColor.js"></script> <script type="text/javascript" src="../../src/color/RGBColor.js"></script>
<script type="text/javascript" src="../../src/color/GrayColor.js"></script> <script type="text/javascript" src="../../src/color/GrayColor.js"></script>
<script type="text/javascript" src="../../src/color/GradientColor.js"></script>
<script type="text/javascript" src="../../src/color/Gradient.js"></script>
<script type="text/javascript" src="../../src/color/GradientStop.js"></script>
<script> <script>
var count = 0; var count = 0;
var doc; var doc;

View file

@ -14,7 +14,9 @@
<script type="text/javascript" src="../../src/basic/Size.js"></script> <script type="text/javascript" src="../../src/basic/Size.js"></script>
<script type="text/javascript" src="../../src/basic/Matrix.js"></script> <script type="text/javascript" src="../../src/basic/Matrix.js"></script>
<script type="text/javascript" src="../../src/document/Doc.js"></script> <script type="text/javascript" src="../../src/document/Doc.js"></script>
<script type="text/javascript" src="../../src/document/Symbol.js"></script>
<script type="text/javascript" src="../../src/item/Item.js"></script> <script type="text/javascript" src="../../src/item/Item.js"></script>
<script type="text/javascript" src="../../src/item/PlacedSymbol.js"></script>
<script type="text/javascript" src="../../src/item/Group.js"></script> <script type="text/javascript" src="../../src/item/Group.js"></script>
<script type="text/javascript" src="../../src/item/Layer.js"></script> <script type="text/javascript" src="../../src/item/Layer.js"></script>
<script type="text/javascript" src="../../src/item/PathStyle.js"></script> <script type="text/javascript" src="../../src/item/PathStyle.js"></script>
@ -25,6 +27,9 @@
<script type="text/javascript" src="../../src/color/Color.js"></script> <script type="text/javascript" src="../../src/color/Color.js"></script>
<script type="text/javascript" src="../../src/color/RGBColor.js"></script> <script type="text/javascript" src="../../src/color/RGBColor.js"></script>
<script type="text/javascript" src="../../src/color/GrayColor.js"></script> <script type="text/javascript" src="../../src/color/GrayColor.js"></script>
<script type="text/javascript" src="../../src/color/GradientColor.js"></script>
<script type="text/javascript" src="../../src/color/Gradient.js"></script>
<script type="text/javascript" src="../../src/color/GradientStop.js"></script>
<script> <script>
var count = 0; var count = 0;
var doc; var doc;

View file

@ -14,7 +14,9 @@
<script type="text/javascript" src="../../src/basic/Size.js"></script> <script type="text/javascript" src="../../src/basic/Size.js"></script>
<script type="text/javascript" src="../../src/basic/Matrix.js"></script> <script type="text/javascript" src="../../src/basic/Matrix.js"></script>
<script type="text/javascript" src="../../src/document/Doc.js"></script> <script type="text/javascript" src="../../src/document/Doc.js"></script>
<script type="text/javascript" src="../../src/document/Symbol.js"></script>
<script type="text/javascript" src="../../src/item/Item.js"></script> <script type="text/javascript" src="../../src/item/Item.js"></script>
<script type="text/javascript" src="../../src/item/PlacedSymbol.js"></script>
<script type="text/javascript" src="../../src/item/Group.js"></script> <script type="text/javascript" src="../../src/item/Group.js"></script>
<script type="text/javascript" src="../../src/item/Layer.js"></script> <script type="text/javascript" src="../../src/item/Layer.js"></script>
<script type="text/javascript" src="../../src/item/PathStyle.js"></script> <script type="text/javascript" src="../../src/item/PathStyle.js"></script>
@ -25,6 +27,9 @@
<script type="text/javascript" src="../../src/color/Color.js"></script> <script type="text/javascript" src="../../src/color/Color.js"></script>
<script type="text/javascript" src="../../src/color/RGBColor.js"></script> <script type="text/javascript" src="../../src/color/RGBColor.js"></script>
<script type="text/javascript" src="../../src/color/GrayColor.js"></script> <script type="text/javascript" src="../../src/color/GrayColor.js"></script>
<script type="text/javascript" src="../../src/color/GradientColor.js"></script>
<script type="text/javascript" src="../../src/color/Gradient.js"></script>
<script type="text/javascript" src="../../src/color/GradientStop.js"></script>
<script> <script>
window.onload = function() { window.onload = function() {
var canvas = document.getElementById('canvas'); var canvas = document.getElementById('canvas');

View file

@ -14,7 +14,9 @@
<script type="text/javascript" src="../../src/basic/Size.js"></script> <script type="text/javascript" src="../../src/basic/Size.js"></script>
<script type="text/javascript" src="../../src/basic/Matrix.js"></script> <script type="text/javascript" src="../../src/basic/Matrix.js"></script>
<script type="text/javascript" src="../../src/document/Doc.js"></script> <script type="text/javascript" src="../../src/document/Doc.js"></script>
<script type="text/javascript" src="../../src/document/Symbol.js"></script>
<script type="text/javascript" src="../../src/item/Item.js"></script> <script type="text/javascript" src="../../src/item/Item.js"></script>
<script type="text/javascript" src="../../src/item/PlacedSymbol.js"></script>
<script type="text/javascript" src="../../src/item/Group.js"></script> <script type="text/javascript" src="../../src/item/Group.js"></script>
<script type="text/javascript" src="../../src/item/Layer.js"></script> <script type="text/javascript" src="../../src/item/Layer.js"></script>
<script type="text/javascript" src="../../src/item/PathStyle.js"></script> <script type="text/javascript" src="../../src/item/PathStyle.js"></script>
@ -25,6 +27,9 @@
<script type="text/javascript" src="../../src/color/Color.js"></script> <script type="text/javascript" src="../../src/color/Color.js"></script>
<script type="text/javascript" src="../../src/color/RGBColor.js"></script> <script type="text/javascript" src="../../src/color/RGBColor.js"></script>
<script type="text/javascript" src="../../src/color/GrayColor.js"></script> <script type="text/javascript" src="../../src/color/GrayColor.js"></script>
<script type="text/javascript" src="../../src/color/GradientColor.js"></script>
<script type="text/javascript" src="../../src/color/Gradient.js"></script>
<script type="text/javascript" src="../../src/color/GradientStop.js"></script>
<script> <script>
window.onload = function() { window.onload = function() {
var canvas = document.getElementById('canvas'); var canvas = document.getElementById('canvas');

View file

@ -14,7 +14,9 @@
<script type="text/javascript" src="../../src/basic/Size.js"></script> <script type="text/javascript" src="../../src/basic/Size.js"></script>
<script type="text/javascript" src="../../src/basic/Matrix.js"></script> <script type="text/javascript" src="../../src/basic/Matrix.js"></script>
<script type="text/javascript" src="../../src/document/Doc.js"></script> <script type="text/javascript" src="../../src/document/Doc.js"></script>
<script type="text/javascript" src="../../src/document/Symbol.js"></script>
<script type="text/javascript" src="../../src/item/Item.js"></script> <script type="text/javascript" src="../../src/item/Item.js"></script>
<script type="text/javascript" src="../../src/item/PlacedSymbol.js"></script>
<script type="text/javascript" src="../../src/item/Group.js"></script> <script type="text/javascript" src="../../src/item/Group.js"></script>
<script type="text/javascript" src="../../src/item/Layer.js"></script> <script type="text/javascript" src="../../src/item/Layer.js"></script>
<script type="text/javascript" src="../../src/item/PathStyle.js"></script> <script type="text/javascript" src="../../src/item/PathStyle.js"></script>
@ -25,6 +27,9 @@
<script type="text/javascript" src="../../src/color/Color.js"></script> <script type="text/javascript" src="../../src/color/Color.js"></script>
<script type="text/javascript" src="../../src/color/RGBColor.js"></script> <script type="text/javascript" src="../../src/color/RGBColor.js"></script>
<script type="text/javascript" src="../../src/color/GrayColor.js"></script> <script type="text/javascript" src="../../src/color/GrayColor.js"></script>
<script type="text/javascript" src="../../src/color/GradientColor.js"></script>
<script type="text/javascript" src="../../src/color/Gradient.js"></script>
<script type="text/javascript" src="../../src/color/GradientStop.js"></script>
<script> <script>
window.onload = function() { window.onload = function() {

View file

@ -14,7 +14,9 @@
<script type="text/javascript" src="../../src/basic/Size.js"></script> <script type="text/javascript" src="../../src/basic/Size.js"></script>
<script type="text/javascript" src="../../src/basic/Matrix.js"></script> <script type="text/javascript" src="../../src/basic/Matrix.js"></script>
<script type="text/javascript" src="../../src/document/Doc.js"></script> <script type="text/javascript" src="../../src/document/Doc.js"></script>
<script type="text/javascript" src="../../src/document/Symbol.js"></script>
<script type="text/javascript" src="../../src/item/Item.js"></script> <script type="text/javascript" src="../../src/item/Item.js"></script>
<script type="text/javascript" src="../../src/item/PlacedSymbol.js"></script>
<script type="text/javascript" src="../../src/item/Group.js"></script> <script type="text/javascript" src="../../src/item/Group.js"></script>
<script type="text/javascript" src="../../src/item/Layer.js"></script> <script type="text/javascript" src="../../src/item/Layer.js"></script>
<script type="text/javascript" src="../../src/item/PathStyle.js"></script> <script type="text/javascript" src="../../src/item/PathStyle.js"></script>
@ -25,6 +27,9 @@
<script type="text/javascript" src="../../src/color/Color.js"></script> <script type="text/javascript" src="../../src/color/Color.js"></script>
<script type="text/javascript" src="../../src/color/RGBColor.js"></script> <script type="text/javascript" src="../../src/color/RGBColor.js"></script>
<script type="text/javascript" src="../../src/color/GrayColor.js"></script> <script type="text/javascript" src="../../src/color/GrayColor.js"></script>
<script type="text/javascript" src="../../src/color/GradientColor.js"></script>
<script type="text/javascript" src="../../src/color/Gradient.js"></script>
<script type="text/javascript" src="../../src/color/GradientStop.js"></script>
<script> <script>
window.onload = function() { window.onload = function() {
var canvas = document.getElementById('canvas'); var canvas = document.getElementById('canvas');

View file

@ -14,7 +14,9 @@
<script type="text/javascript" src="../../src/basic/Size.js"></script> <script type="text/javascript" src="../../src/basic/Size.js"></script>
<script type="text/javascript" src="../../src/basic/Matrix.js"></script> <script type="text/javascript" src="../../src/basic/Matrix.js"></script>
<script type="text/javascript" src="../../src/document/Doc.js"></script> <script type="text/javascript" src="../../src/document/Doc.js"></script>
<script type="text/javascript" src="../../src/document/Symbol.js"></script>
<script type="text/javascript" src="../../src/item/Item.js"></script> <script type="text/javascript" src="../../src/item/Item.js"></script>
<script type="text/javascript" src="../../src/item/PlacedSymbol.js"></script>
<script type="text/javascript" src="../../src/item/Group.js"></script> <script type="text/javascript" src="../../src/item/Group.js"></script>
<script type="text/javascript" src="../../src/item/Layer.js"></script> <script type="text/javascript" src="../../src/item/Layer.js"></script>
<script type="text/javascript" src="../../src/item/PathStyle.js"></script> <script type="text/javascript" src="../../src/item/PathStyle.js"></script>
@ -25,6 +27,9 @@
<script type="text/javascript" src="../../src/color/Color.js"></script> <script type="text/javascript" src="../../src/color/Color.js"></script>
<script type="text/javascript" src="../../src/color/RGBColor.js"></script> <script type="text/javascript" src="../../src/color/RGBColor.js"></script>
<script type="text/javascript" src="../../src/color/GrayColor.js"></script> <script type="text/javascript" src="../../src/color/GrayColor.js"></script>
<script type="text/javascript" src="../../src/color/GradientColor.js"></script>
<script type="text/javascript" src="../../src/color/Gradient.js"></script>
<script type="text/javascript" src="../../src/color/GradientStop.js"></script>
<script> <script>
window.onload = function() { window.onload = function() {
var canvas = document.getElementById('canvas'); var canvas = document.getElementById('canvas');

View file

@ -14,7 +14,9 @@
<script type="text/javascript" src="../../src/basic/Size.js"></script> <script type="text/javascript" src="../../src/basic/Size.js"></script>
<script type="text/javascript" src="../../src/basic/Matrix.js"></script> <script type="text/javascript" src="../../src/basic/Matrix.js"></script>
<script type="text/javascript" src="../../src/document/Doc.js"></script> <script type="text/javascript" src="../../src/document/Doc.js"></script>
<script type="text/javascript" src="../../src/document/Symbol.js"></script>
<script type="text/javascript" src="../../src/item/Item.js"></script> <script type="text/javascript" src="../../src/item/Item.js"></script>
<script type="text/javascript" src="../../src/item/PlacedSymbol.js"></script>
<script type="text/javascript" src="../../src/item/Group.js"></script> <script type="text/javascript" src="../../src/item/Group.js"></script>
<script type="text/javascript" src="../../src/item/Layer.js"></script> <script type="text/javascript" src="../../src/item/Layer.js"></script>
<script type="text/javascript" src="../../src/item/PathStyle.js"></script> <script type="text/javascript" src="../../src/item/PathStyle.js"></script>
@ -25,6 +27,9 @@
<script type="text/javascript" src="../../src/color/Color.js"></script> <script type="text/javascript" src="../../src/color/Color.js"></script>
<script type="text/javascript" src="../../src/color/RGBColor.js"></script> <script type="text/javascript" src="../../src/color/RGBColor.js"></script>
<script type="text/javascript" src="../../src/color/GrayColor.js"></script> <script type="text/javascript" src="../../src/color/GrayColor.js"></script>
<script type="text/javascript" src="../../src/color/GradientColor.js"></script>
<script type="text/javascript" src="../../src/color/Gradient.js"></script>
<script type="text/javascript" src="../../src/color/GradientStop.js"></script>
<script> <script>
window.onload = function() { window.onload = function() {
var canvas = document.getElementById('canvas'); var canvas = document.getElementById('canvas');

View file

@ -14,7 +14,9 @@
<script type="text/javascript" src="../../src/basic/Size.js"></script> <script type="text/javascript" src="../../src/basic/Size.js"></script>
<script type="text/javascript" src="../../src/basic/Matrix.js"></script> <script type="text/javascript" src="../../src/basic/Matrix.js"></script>
<script type="text/javascript" src="../../src/document/Doc.js"></script> <script type="text/javascript" src="../../src/document/Doc.js"></script>
<script type="text/javascript" src="../../src/document/Symbol.js"></script>
<script type="text/javascript" src="../../src/item/Item.js"></script> <script type="text/javascript" src="../../src/item/Item.js"></script>
<script type="text/javascript" src="../../src/item/PlacedSymbol.js"></script>
<script type="text/javascript" src="../../src/item/Group.js"></script> <script type="text/javascript" src="../../src/item/Group.js"></script>
<script type="text/javascript" src="../../src/item/Layer.js"></script> <script type="text/javascript" src="../../src/item/Layer.js"></script>
<script type="text/javascript" src="../../src/item/PathStyle.js"></script> <script type="text/javascript" src="../../src/item/PathStyle.js"></script>
@ -25,6 +27,9 @@
<script type="text/javascript" src="../../src/color/Color.js"></script> <script type="text/javascript" src="../../src/color/Color.js"></script>
<script type="text/javascript" src="../../src/color/RGBColor.js"></script> <script type="text/javascript" src="../../src/color/RGBColor.js"></script>
<script type="text/javascript" src="../../src/color/GrayColor.js"></script> <script type="text/javascript" src="../../src/color/GrayColor.js"></script>
<script type="text/javascript" src="../../src/color/GradientColor.js"></script>
<script type="text/javascript" src="../../src/color/Gradient.js"></script>
<script type="text/javascript" src="../../src/color/GradientStop.js"></script>
<script> <script>
window.onload = function() { window.onload = function() {

View file

@ -14,7 +14,9 @@
<script type="text/javascript" src="../../src/basic/Size.js"></script> <script type="text/javascript" src="../../src/basic/Size.js"></script>
<script type="text/javascript" src="../../src/basic/Matrix.js"></script> <script type="text/javascript" src="../../src/basic/Matrix.js"></script>
<script type="text/javascript" src="../../src/document/Doc.js"></script> <script type="text/javascript" src="../../src/document/Doc.js"></script>
<script type="text/javascript" src="../../src/document/Symbol.js"></script>
<script type="text/javascript" src="../../src/item/Item.js"></script> <script type="text/javascript" src="../../src/item/Item.js"></script>
<script type="text/javascript" src="../../src/item/PlacedSymbol.js"></script>
<script type="text/javascript" src="../../src/item/Group.js"></script> <script type="text/javascript" src="../../src/item/Group.js"></script>
<script type="text/javascript" src="../../src/item/Layer.js"></script> <script type="text/javascript" src="../../src/item/Layer.js"></script>
<script type="text/javascript" src="../../src/item/PathStyle.js"></script> <script type="text/javascript" src="../../src/item/PathStyle.js"></script>
@ -25,6 +27,9 @@
<script type="text/javascript" src="../../src/color/Color.js"></script> <script type="text/javascript" src="../../src/color/Color.js"></script>
<script type="text/javascript" src="../../src/color/RGBColor.js"></script> <script type="text/javascript" src="../../src/color/RGBColor.js"></script>
<script type="text/javascript" src="../../src/color/GrayColor.js"></script> <script type="text/javascript" src="../../src/color/GrayColor.js"></script>
<script type="text/javascript" src="../../src/color/GradientColor.js"></script>
<script type="text/javascript" src="../../src/color/Gradient.js"></script>
<script type="text/javascript" src="../../src/color/GradientStop.js"></script>
<script> <script>
window.onload = function() { window.onload = function() {
var canvas = document.getElementById('canvas'); var canvas = document.getElementById('canvas');

View file

@ -14,7 +14,9 @@
<script type="text/javascript" src="../../src/basic/Size.js"></script> <script type="text/javascript" src="../../src/basic/Size.js"></script>
<script type="text/javascript" src="../../src/basic/Matrix.js"></script> <script type="text/javascript" src="../../src/basic/Matrix.js"></script>
<script type="text/javascript" src="../../src/document/Doc.js"></script> <script type="text/javascript" src="../../src/document/Doc.js"></script>
<script type="text/javascript" src="../../src/document/Symbol.js"></script>
<script type="text/javascript" src="../../src/item/Item.js"></script> <script type="text/javascript" src="../../src/item/Item.js"></script>
<script type="text/javascript" src="../../src/item/PlacedSymbol.js"></script>
<script type="text/javascript" src="../../src/item/Group.js"></script> <script type="text/javascript" src="../../src/item/Group.js"></script>
<script type="text/javascript" src="../../src/item/Layer.js"></script> <script type="text/javascript" src="../../src/item/Layer.js"></script>
<script type="text/javascript" src="../../src/item/PathStyle.js"></script> <script type="text/javascript" src="../../src/item/PathStyle.js"></script>
@ -25,6 +27,9 @@
<script type="text/javascript" src="../../src/color/Color.js"></script> <script type="text/javascript" src="../../src/color/Color.js"></script>
<script type="text/javascript" src="../../src/color/RGBColor.js"></script> <script type="text/javascript" src="../../src/color/RGBColor.js"></script>
<script type="text/javascript" src="../../src/color/GrayColor.js"></script> <script type="text/javascript" src="../../src/color/GrayColor.js"></script>
<script type="text/javascript" src="../../src/color/GradientColor.js"></script>
<script type="text/javascript" src="../../src/color/Gradient.js"></script>
<script type="text/javascript" src="../../src/color/GradientStop.js"></script>
<script> <script>
window.onload = function() { window.onload = function() {
var canvas = document.getElementById('canvas'); var canvas = document.getElementById('canvas');

View file

@ -14,7 +14,9 @@
<script type="text/javascript" src="../../src/basic/Size.js"></script> <script type="text/javascript" src="../../src/basic/Size.js"></script>
<script type="text/javascript" src="../../src/basic/Matrix.js"></script> <script type="text/javascript" src="../../src/basic/Matrix.js"></script>
<script type="text/javascript" src="../../src/document/Doc.js"></script> <script type="text/javascript" src="../../src/document/Doc.js"></script>
<script type="text/javascript" src="../../src/document/Symbol.js"></script>
<script type="text/javascript" src="../../src/item/Item.js"></script> <script type="text/javascript" src="../../src/item/Item.js"></script>
<script type="text/javascript" src="../../src/item/PlacedSymbol.js"></script>
<script type="text/javascript" src="../../src/item/Group.js"></script> <script type="text/javascript" src="../../src/item/Group.js"></script>
<script type="text/javascript" src="../../src/item/Layer.js"></script> <script type="text/javascript" src="../../src/item/Layer.js"></script>
<script type="text/javascript" src="../../src/item/PathStyle.js"></script> <script type="text/javascript" src="../../src/item/PathStyle.js"></script>
@ -25,6 +27,9 @@
<script type="text/javascript" src="../../src/color/Color.js"></script> <script type="text/javascript" src="../../src/color/Color.js"></script>
<script type="text/javascript" src="../../src/color/RGBColor.js"></script> <script type="text/javascript" src="../../src/color/RGBColor.js"></script>
<script type="text/javascript" src="../../src/color/GrayColor.js"></script> <script type="text/javascript" src="../../src/color/GrayColor.js"></script>
<script type="text/javascript" src="../../src/color/GradientColor.js"></script>
<script type="text/javascript" src="../../src/color/Gradient.js"></script>
<script type="text/javascript" src="../../src/color/GradientStop.js"></script>
<script> <script>
window.onload = function() { window.onload = function() {
var canvas = document.getElementById('canvas'); var canvas = document.getElementById('canvas');