mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Add test to compare cloning of item with a GradientColor.
This commit is contained in:
parent
e3ba43ce3b
commit
7fe21754f5
1 changed files with 11 additions and 0 deletions
|
@ -22,6 +22,17 @@ test('Path#clone()', function() {
|
|||
cloneAndCompare(path);
|
||||
});
|
||||
|
||||
test('Path#clone() with GradientColor', function() {
|
||||
var colors = ['red', 'green', 'black'];
|
||||
var gradient = new Gradient(colors, 'radial');
|
||||
var color = new GradientColor(gradient, [0, 0], [20, 20], [10, 10]);
|
||||
|
||||
var proj = paper.project;
|
||||
var path = new Path([10, 20], [30, 40]);
|
||||
path.fillColor = color;
|
||||
cloneAndCompare(path);
|
||||
});
|
||||
|
||||
test('CompoundPath#clone()', function() {
|
||||
var path1 = new Path.Rectangle([200, 200], [100, 100]);
|
||||
var path2 = new Path.Rectangle([50, 50], [200, 200]);
|
||||
|
|
Loading…
Reference in a new issue