Allow direct passing of color arguments to gradient constructors as well as arrays.

This commit is contained in:
Jürg Lehni 2013-03-01 17:44:16 -08:00
parent 58fad6ed72
commit 5afa1b1688
6 changed files with 13 additions and 12 deletions
examples/JSON

View file

@ -7,7 +7,7 @@
<script type="text/javascript" src="../../dist/paper.js"></script>
<script type="text/paperscript" canvas="canvas1">
var path = new Path.Circle(view.center, view.bounds.height * 0.4);
var gradient = new RadialGradient([ 'yellow', 'red', 'black']);
var gradient = new RadialGradient('yellow', 'red', 'black');
var from = path.position;
var to = path.bounds.rightCenter;
var gradientColor = new GradientColor(gradient, from, to);