Paper.js Subraster Added Behind Rectangle Instead Of In Front
In this Paper.js Sketch, selecting an area of the Mona Lisa raster makes a whiteout Rectangle of the area in place, as well as a generating a subraster of the area. The whiteout re
Solution 1:
If you look at the getSubRaster()
function, you can see that it inserts the returned raster directly above the raster object it was created from.
function() {
var rect = Rectangle.read(arguments),
raster = new Raster(Item.NO_INSERT);
raster.setImage(this.getSubCanvas(rect));
raster.translate(rect.getCenter().subtract(this.getSize().divide(2)));
raster._matrix.preConcatenate(this._matrix);
raster.insertAbove(this);
return raster;
}
Post a Comment for "Paper.js Subraster Added Behind Rectangle Instead Of In Front"