From 7fe21754f5dbc7bc1d2ad2de816d74ce127ae3b7 Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Sat, 21 May 2011 12:11:44 +0200 Subject: [PATCH] Add test to compare cloning of item with a GradientColor. --- test/tests/Item_Cloning.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/tests/Item_Cloning.js b/test/tests/Item_Cloning.js index c16b6670..d97e1832 100644 --- a/test/tests/Item_Cloning.js +++ b/test/tests/Item_Cloning.js @@ -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]);