diff --git a/test/tests/Item.js b/test/tests/Item.js index b9bca0cc..e731d311 100644 --- a/test/tests/Item.js +++ b/test/tests/Item.js @@ -622,4 +622,33 @@ test('Item#data', function() { equals(item.data.testing, true, 'we can set data using an object literal constructor'); // TODO: add tests to see if importing and exporting of Item#data works -}); \ No newline at end of file +}); + +test('blendmode on an item in a transformed group', function() { + var layer = new Layer(); + var path1 = new Path.Rectangle({ + size: [100, 100], + fillColor: new RgbColor(1, 0, 0) + }); + + var path2 = new Path.Circle({ + radius: 25, + center: [50, 50], + fillColor: new RgbColor(0, 1, 0), + blendMode: 'screen' + }); + + var raster = layer.rasterize(); + compareRgbColors(raster.getPixel(0, 0), new RgbColor(1, 0, 0), 'Top left pixel'); + compareRgbColors(raster.getPixel(50, 50), new RgbColor(1, 1, 0), 'Middle center pixel'); + + raster.remove(); + path2.position = [0, 0]; + + var group = new Group(path2); + group.position = [50, 50]; + + var raster = layer.rasterize(); + compareRgbColors(raster.getPixel(0, 0), new RgbColor(1, 0, 0), 'Top left pixel'); + compareRgbColors(raster.getPixel(50, 50), new RgbColor(1, 1, 0), 'Middle center pixel'); +});