Invert filter

This commit is contained in:
Devine Lu Linvega
2017-01-03 15:53:39 -07:00
parent c02348a091
commit 024bda099f
11 changed files with 35 additions and 3 deletions

View File

@@ -7,6 +7,7 @@ function Render(rune)
this.collection["stencil"] = new Filter_Stencil();
this.collection["rotate"] = new Filter_Rotate();
this.collection["invert"] = new Filter_Invert();
this.active = function(cmd)
{

View File

@@ -18,12 +18,14 @@ function Surface(rune)
this.resize(cmd.rect(),cmd.position());
ronin.overlay.resize(cmd.rect());
}
if(cmd.color()){
this.context().beginPath();
this.context().rect(0, 0, this.active_layer.element.width, this.active_layer.element.height);
this.context().fillStyle = cmd.color().hex;
this.context().fill();
}
if(cmd.bang() && Object.keys(ronin.surface.layers).length > 1){
delete this.layers[this.active_layer.name];
this.select_any_layer();