Implemented crop

This commit is contained in:
Devine Lu Linvega
2017-09-27 12:43:27 +13:00
parent 410a4ff1f4
commit 3b40d555c8
10 changed files with 140 additions and 72 deletions

View File

@@ -20,7 +20,11 @@ function Frame()
this.methods.crop = function(p)
{
var data = ronin.render.select(p.x,p.y,p.width,p.height);
ronin.render.clear();
ronin.frame.resize_to(p);
ronin.render.context().putImageData(data, 0, 0);
}
this.resize_to = function(size)
@@ -33,5 +37,6 @@ function Frame()
win.setSize(size.width,size.height);
ronin.render.resize_to(size);
ronin.grid.resize_to(size);
ronin.guide.resize_to(size);
}
}