Completed Path
This commit is contained in:
parent
cc37e3ff98
commit
a0e557d243
@ -161,7 +161,6 @@ function Cursor(rune)
|
||||
this.mode.mouse_from = this.position;
|
||||
this.mode.mouse_held = true;
|
||||
this.mode.mouse_down(this.position);
|
||||
console.log(this.mode)
|
||||
}
|
||||
|
||||
ronin.terminal.update_hint();
|
||||
|
@ -51,23 +51,6 @@ function Module(rune)
|
||||
ronin.terminal.log(new Log(this,"Unknown setting: "+key));
|
||||
}
|
||||
|
||||
this.run_methods = function(cmd)
|
||||
{
|
||||
var methods = cmd.methods();
|
||||
for(i in methods){
|
||||
var content = methods[i].split(":");
|
||||
var name = content.shift();
|
||||
var params = content;
|
||||
if(this[name]){
|
||||
this[name](params);
|
||||
}
|
||||
else{
|
||||
ronin.terminal.log(new Log(this,name+" is not a method of "+this.constructor.name,"error"));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
this.add_method = function(method)
|
||||
{
|
||||
this.methods[method.name] = method;
|
||||
@ -83,7 +66,7 @@ function Module(rune)
|
||||
|
||||
if(this.methods[method_name]){
|
||||
s = this.methods[method_name].params;
|
||||
s += this.methods[method_name].mouse_event ? "<i>["+this.methods[method_name].mouse_event+"]</i> " : "";
|
||||
s += this.methods[method_name].mouse_event ? " <i>"+this.methods[method_name].mouse_event+"</i> " : "";
|
||||
}
|
||||
else{
|
||||
for(method in this.methods){
|
||||
|
@ -17,10 +17,13 @@ function Path(rune)
|
||||
if(!ronin.path.layer){ ronin.path.create_layer(); ronin.path.layer.is_blinking = true; }
|
||||
|
||||
this.layer.clear();
|
||||
this.layer.context().lineCap = this.settings["line_cap"];
|
||||
this.layer.context().lineWidth = this.settings["line_width"];
|
||||
this.layer.context().strokeStyle = this.settings["line_color"];
|
||||
ronin.path.layer.context().stroke(new Path2D(params.content));
|
||||
|
||||
var target_layer = preview ? this.layer : ronin.frame.active_layer;
|
||||
|
||||
target_layer.context().lineCap = this.settings["line_cap"];
|
||||
target_layer.context().lineWidth = this.settings["line_width"];
|
||||
target_layer.context().strokeStyle = this.settings["line_color"];
|
||||
target_layer.context().stroke(new Path2D(params.content));
|
||||
}
|
||||
|
||||
this.fill = function(params,preview = false)
|
||||
@ -28,9 +31,12 @@ function Path(rune)
|
||||
if(!ronin.path.layer){ ronin.path.create_layer(); ronin.path.layer.is_blinking = true; }
|
||||
|
||||
this.layer.clear();
|
||||
this.layer.context().fillStyle = this.settings["fill_color"];
|
||||
|
||||
ronin.path.layer.context().fill(new Path2D(params.content));
|
||||
var target_layer = preview ? this.layer : ronin.frame.active_layer;
|
||||
|
||||
target_layer.context().fillStyle = this.settings["fill_color"];
|
||||
|
||||
target_layer.context().fill(new Path2D(params.content));
|
||||
}
|
||||
|
||||
// Tools
|
||||
|
Loading…
x
Reference in New Issue
Block a user