diff --git a/README.md b/README.md index 2ad1722..dc0c1b0 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,7 @@ Manager for the canvas size File import/export tools. ### Methods +- `open:browser` Press enter to open the file browser. - `load:browser` Press enter to open the file browser. - `draw:X,Y|WxH` Draw the loaded image pixels. - `save:jpg/png` Export canvas. @@ -48,7 +49,7 @@ File import/export tools. ## path -Trace lines and to draw shapes. +Trace lines and draw shapes. ### Methods - `stroke:x,y&` diff --git a/sources/scripts/modules/frame.js b/sources/scripts/modules/frame.js index 5af4bf0..2c14e5e 100644 --- a/sources/scripts/modules/frame.js +++ b/sources/scripts/modules/frame.js @@ -13,17 +13,11 @@ function Frame() }); this.methods.rescale = new Method("rescale","0.5","Rescale canvas to float.",function(p){ - var copy_canvas = document.createElement("canvas"); - copy_canvas.width = ronin.frame.width * 2; - copy_canvas.height = ronin.frame.settings.height * 2; - var copy_ctx = copy_canvas.getContext("2d"); - copy_ctx.drawImage(ronin.render.to_img(), 0, 0); var new_size = {width:ronin.frame.width * p,height:ronin.frame.height * p}; - ronin.render.clear(); - ronin.frame.resize_to(new_size); - ronin.render.context().drawImage(copy_ctx.canvas,0,0,new_size.width * 2,new_size.height * 2); + ronin.render.context().drawImage(ronin.render.to_img(),0,0,new_size.width * 2,new_size.height * 2); + setTimeout(ronin.frame.methods.resize.run(new_size),1000) }); this.methods.crop = new Method("crop","X,Y|WxH","Crop canvas to rect.",function(p){ diff --git a/sources/scripts/modules/path.js b/sources/scripts/modules/path.js index 01bdfd7..318063b 100644 --- a/sources/scripts/modules/path.js +++ b/sources/scripts/modules/path.js @@ -1,6 +1,6 @@ function Path() { - Module.call(this,"path","Trace lines and to draw shapes."); + Module.call(this,"path","Trace lines and draw shapes."); this.settings = {thickness:4,color:"red",cap:"square"};