Added Stencil
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user