Various fixes

This commit is contained in:
Devine Lu Linvega 2017-01-16 21:29:39 -07:00
parent 8b963e6283
commit a5a9fb3e6f
7 changed files with 13 additions and 19 deletions

View File

@ -24,9 +24,9 @@ Missing documentation.
- Variables:
### $ FileSave
Missing documentation.
Creates a new window with a image of the resulting canvas in the specified format.
- Parameters: `Any`
- Variables:
- Variables: `format`
### ^ History
Missing documentation.
@ -115,5 +115,5 @@ rate=10 ; variable: rate = 10
## Templates
### Watermark
```
# 1280x720 ; / ../assets/photo.jpg 1280x 0,0 ; / ../assets/logo.png 60x60 20,660
# 1280x720 ; / ../assets/photo.jpg 1280x 0,0 ; / ../assets/logo.png 60x60 20,620
```

View File

@ -7,11 +7,11 @@ canvas:hover { cursor: crosshair;}
#surface { width:50vw; height:50vh; overflow:hidden; position:fixed; left:50%; top:50%; background:none; border-radius:3px;}
#surface .layer { position:absolute; top:0px; left:0px; width:100%; height:100%;}
#overlay { position:absolute; z-index:1000;}
#widget { color:#fff; position:absolute; font-size:10px; padding-top:10px; border-top:1px solid #333; background-image:url(../media/graphics/logo.svg); background-repeat:no-repeat; background-size:80px 80px; height:100px; background-position: -10px 10px}
#widget { color:#fff; position:absolute; font-size:10px; padding-top:10px; border-top:1px solid #333; background-image:url(../media/graphics/logo.svg); background-repeat:no-repeat; background-size:80px 80px; height:100px; background-position: -10px 10px; line-height:20px;}
#widget .module:first-child { margin-left:80px; }
#widget .module { float:left; margin-right:10px; margin-top:5px }
#widget .module { float:left; margin-right:10px; margin-top:5px; width: 20% }
#widget .module .highlight:after { content:"_"; color:red;}
#widget .cursor { float:right; text-align: right}
#widget .cursor { float:right; text-align: right; margin-top:5px}
#widget .layer:hover { cursor:pointer;}
#commander { display:none; z-index: 2000; position:fixed; }

View File

@ -35,12 +35,6 @@
<script type="text/javascript" src="scripts/filters/invert.js"></script>
<script type="text/javascript" src="scripts/filters/chromatic.js"></script>
<!-- Need to migrate
<script type="text/javascript" src="scripts/filters/saturation.js"></script>
<script type="text/javascript" src="scripts/filters/offset.js"></script>
<script type="text/javascript" src="scripts/filters/balance.js"></script>
-->
<script type="text/javascript" src="scripts/core/keyboard.js"></script>
<script type="text/javascript" src="scripts/core/cursor.js"></script>
<script type="text/javascript" src="scripts/core/command.js"></script>

View File

@ -38,5 +38,4 @@ commander.query("# layer=background");
// commander.query("# #efefef");
commander.query("# layer=main");
commander.query("> 1 0,0 #ff0000");
commander.query("> 1 1,0 #ff0000");
commander.query("> 1 0,1 #ff0000");
commander.query("> 1 1,1 #ff0000");

View File

@ -76,8 +76,7 @@ function Brush(rune)
this.widget_cursor = function()
{
var s = "> "+this.size+"<br />";
var s = "> "+this.size+" "+this.color.hex+"<br />";
for (i = 0; i < ronin.brush.pointers.length; i++) {
s += ronin.brush.pointers[i].widget();

View File

@ -3,13 +3,15 @@ function FileSave(rune)
Module.call(this,rune);
this.parameters = [Any];
this.variables = {"format" : "png"};
this.variables = {"format" : "[png/jpg]"};
this.docs = "Creates a new window with a image of the resulting canvas in the specified format.";
this.active = function(cmd)
{
var d = null;
if(cmd.variable("format").value == "jpg"){
if(cmd.variable("format") && cmd.variable("format").value == "jpg"){
var d = ronin.surface.active_layer.element.toDataURL('image/jpeg');
}
else{

View File

@ -63,7 +63,7 @@ function Help(rune)
html += "```\n# Light\n> 1,1;> 2,2;> 3,3;> 4,4\n# Hard\n> 2,2;> 4,4;> 6,6;> 8,8\n# Symmetric Light\n> 1,1 600x;> 2,2 600x;> 3,3 600x;> 4,4 600x\n```\n";
html += "## Templates\n";
html += "### Watermark\n";
html += "```\n# 1280x800 ; / ../assets/photo.jpg 1280x 0,0 ; / assets/logo.png 60x60 20,720\n```\n";
html += "```\n# 1280x720 ; / ../assets/photo.jpg 1280x 0,0 ; / ../assets/logo.png 60x60 20,640\n```\n";
return html;
}