*
This commit is contained in:
parent
670392140b
commit
3ab2d36a46
@ -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&`
|
||||
|
@ -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){
|
||||
|
@ -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"};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user