Added guides to brushes.
This commit is contained in:
parent
b73da6c167
commit
941c9d6575
@ -79,5 +79,13 @@ $ ! ; Clear temporary storage
|
||||
#Presets
|
||||
##Radial Brush
|
||||
```
|
||||
# 8 strands
|
||||
> 600,400 45' 3;> 600,400 90' 3;> 600,400 135' 3;> 600,400 180' 3;> 600,400 225' 3;> 600,400 270' 3;> 600,400 315' 3
|
||||
# 6 strands
|
||||
> 600,400 60' 3;> 600,400 120' 3;> 600,400 180' 3;> 600,400 240' 3;> 600,400 300' 3
|
||||
```
|
||||
##Symmetry Brush
|
||||
```
|
||||
# XY
|
||||
> 600,400 45' 3
|
||||
```
|
@ -43,6 +43,15 @@ function Brush()
|
||||
|
||||
this.passive = function(cmd)
|
||||
{
|
||||
if(cmd.rect()){
|
||||
var x = isNaN(cmd.rect().width) ? 0 : cmd.rect().width;
|
||||
var y = isNaN(cmd.rect().height) ? 0 : cmd.rect().height;
|
||||
var pos = new Position(x+","+y);
|
||||
ronin.overlay.draw(pos);
|
||||
}
|
||||
if(cmd.angle() && cmd.position()){
|
||||
ronin.overlay.draw(cmd.position());
|
||||
}
|
||||
}
|
||||
|
||||
this.hint = function(cmd)
|
||||
|
@ -55,10 +55,10 @@ function Pointer(offset = new Position(), color = new Color('000000'))
|
||||
return new Position(x + this.offset.x,y + this.offset.y);
|
||||
}
|
||||
else if(this.mirror && this.mirror.width > 0){
|
||||
return new Position(this.mirror.width - (ronin.brush.position.x + this.offset.x), 0 + (ronin.brush.position.y + this.offset.y));
|
||||
return new Position((2 * this.mirror.width) - (ronin.brush.position.x + this.offset.x), 0 + (ronin.brush.position.y + this.offset.y));
|
||||
}
|
||||
else if(this.mirror && this.mirror.height > 0){
|
||||
return new Position((ronin.brush.position.x + this.offset.x), this.mirror.height - (ronin.brush.position.y + this.offset.y));
|
||||
return new Position((ronin.brush.position.x + this.offset.x), (2 * this.mirror.height) - (ronin.brush.position.y + this.offset.y));
|
||||
}
|
||||
return new Position(ronin.brush.position.x + this.offset.x, ronin.brush.position.y + this.offset.y);
|
||||
}
|
||||
|
@ -101,8 +101,8 @@ function Overlay(element)
|
||||
{
|
||||
this.context().beginPath();
|
||||
|
||||
this.context().moveTo(position.x,0);
|
||||
this.context().lineTo(position.x,this.element.height);
|
||||
this.context().moveTo(0,position.y);
|
||||
this.context().lineTo(this.element.width,position.y);
|
||||
|
||||
this.context().lineCap="round";
|
||||
this.context().lineWidth = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user