Added Stencil

This commit is contained in:
Devine Lu Linvega
2017-11-15 17:37:53 +13:00
parent e1ff9358b5
commit aa64d70870
6 changed files with 98 additions and 16 deletions

View File

@@ -41,6 +41,11 @@ function Frame()
ronin.render.fill(q);
});
this.methods.inspect = new Method("inspect","","View canvas details",function(q){
ronin.layers.guide.inspect = ronin.layers.guide.inspect ? false : true;
ronin.layers.guide.draw();
});
this.resize_to = function(size)
{
ronin.frame.width = size.width;

View File

@@ -55,7 +55,8 @@ function IO()
{
var width = parseInt(img.naturalWidth * 0.5);
var height = parseInt(img.naturalHeight * 0.5);
var scale = (params.width/width) * 2;
var scale = params.width > params.height ? (params.width/width) * 2 : (params.height/height) * 2;
ctx.drawImage(img, params.x * 2,params.y * 2,width * scale,height * scale);
}

View File

@@ -4,7 +4,7 @@ function Magnet()
this.settings = {size:0,step:4};
this.methods.lock = new Method("lock","10x10","Magnetize cursor",function(q){
this.methods.lock = new Method("lock","10","Magnetize cursor",function(q){
var size = parseInt(q);
if(size < 5){ this.unlock(); return; }
ronin.magnet.settings.size = size;