Implemented globals for scale and color
This commit is contained in:
@@ -17,10 +17,11 @@ function Brush()
|
||||
})
|
||||
|
||||
this.methods.pick = new Method("pick","x,y","Set brush color to a position's pixel.",function(q){
|
||||
var pixel = ronin.render.context().getImageData(q.x*2, q.y*2, 1, 1).data;
|
||||
var pixel = (ronin.commander.input_el.value == "~" ? ronin.guide: ronin.render).context() .getImageData(q.x*2, q.y*2, 1, 1).data;
|
||||
var c = new Color().rgb_to_hex(pixel);
|
||||
var color = new Color(c);
|
||||
ronin.cursor.color = color.hex;
|
||||
ronin.hint.update();
|
||||
})
|
||||
|
||||
this.absolute_thickness = 0;
|
||||
|
||||
@@ -18,7 +18,7 @@ function Filter()
|
||||
ronin.render.context().putImageData(originalData, 0, 0);
|
||||
});
|
||||
|
||||
this.methods.saturation = new Method("saturation","0.5,0.5","Filter color saturation.",function(q){
|
||||
this.methods.saturation = new Method("saturation","#ff00333","Filter color saturation.",function(q){
|
||||
|
||||
var color = new Color(q).floats();
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ function Path()
|
||||
|
||||
var ctx = ronin.preview.context();
|
||||
ctx.beginPath();
|
||||
ctx.lineCap = q.settings.cap ? q.settings.cap : ronin.path.settings.cap;
|
||||
ctx.lineCap = ronin.path.settings.cap;
|
||||
ctx.lineWidth = ronin.cursor.size;
|
||||
ctx.strokeStyle = ronin.cursor.color;
|
||||
ctx.stroke(new Path2D(path));
|
||||
|
||||
Reference in New Issue
Block a user