Merge on export
This commit is contained in:
parent
fd43a939b8
commit
7daa53a6d3
@ -1,4 +1,4 @@
|
||||
body { margin:0px; padding:0px; overflow:hidden; font-family:"input_mono_medium",courier,monospace; background:red;}
|
||||
body { margin:0px; padding:0px; overflow:hidden; font-family:"input_mono_medium",courier,monospace; background:000;}
|
||||
*:focus {outline: none; }
|
||||
|
||||
canvas { cursor: none }
|
||||
@ -12,7 +12,7 @@ yu { display:block; }
|
||||
#below { z-index:799; position: fixed; }
|
||||
#grid { z-index:795;position: fixed; }
|
||||
|
||||
#ronin { background-color:#aaa; height: 100vh; width:100vw; background-image:url(../media/assets/grid.svg);}
|
||||
#ronin { background-color:#ccc; height: 100vh; width:100vw; background-image:url(../media/assets/grid.svg);}
|
||||
#commander, #hint { position: fixed;bottom: 8px;left: 0px;width: 100vw;line-height: 40px;-webkit-user-select: none;-webkit-app-region: drag;z-index: 900;height: 40px; font-size:11px; cursor: default;}
|
||||
#commander { z-index: 9000; }
|
||||
#commander input { background: transparent;width: calc(100vw - 30px);display: block;line-height: 40px;font-size: 11px;color: black; margin-left:20px; z-index: 9000;position: relative; }
|
||||
|
@ -49,7 +49,7 @@ function IO()
|
||||
this.methods.save = new Method("save","jpg/png","Export canvas.",function(q){
|
||||
var ext = q ? q : "jpg";
|
||||
var fs = require('fs');
|
||||
var data = ronin.cursor.target.to_base64(ext).replace(/^data:image\/\w+;base64,/, "");
|
||||
var data = ronin.io.render().to_base64(ext).replace(/^data:image\/\w+;base64,/, "");
|
||||
var buf = new Buffer(data, 'base64');
|
||||
|
||||
dialog.showSaveDialog((fileName) => {
|
||||
@ -67,6 +67,16 @@ function IO()
|
||||
}
|
||||
}
|
||||
|
||||
this.render = function()
|
||||
{
|
||||
var export_layer = new Layer();
|
||||
|
||||
export_layer.update();
|
||||
export_layer.context().drawImage(ronin.layers.below.el,0,0)
|
||||
export_layer.context().drawImage(ronin.layers.above.el,0,0)
|
||||
return export_layer;
|
||||
}
|
||||
|
||||
this.draw_image = function(ctx = ronin.preview.context(),img,params)
|
||||
{
|
||||
var width = parseInt(img.naturalWidth * 0.5);
|
||||
|
Loading…
x
Reference in New Issue
Block a user