parent
5669a07fe3
commit
a6706745b8
|
@ -140,10 +140,7 @@ Selection.prototype.cut_out_background = function(){
|
|||
// this is mainly in order to support patterns as the background color
|
||||
// NOTE: must come before cutout canvas is modified
|
||||
var colored_cutout = new Canvas(cutout);
|
||||
// TODO: use replace_colors_with_swatch with sel.x, sel.y to support patterns properly (fix the offset)
|
||||
colored_cutout.ctx.globalCompositeOperation = "source-in";
|
||||
colored_cutout.ctx.fillStyle = colors.background;
|
||||
colored_cutout.ctx.fillRect(0, 0, colored_cutout.width, colored_cutout.height);
|
||||
replace_colors_with_swatch(colored_cutout.ctx, colors.background, sel.x, sel.y);
|
||||
var colored_cutout_image_data = colored_cutout.ctx.getImageData(0, 0, sel.width, sel.height);
|
||||
// }
|
||||
|
||||
|
|
Loading…
Reference in New Issue