flood fill / sample brush shape, fix rectangle snapping
This commit is contained in:
parent
685bde5c21
commit
a989d97744
@ -44,5 +44,8 @@ void Brush::RenderPoint(Renderer * ren, ui::Point position)
|
||||
|
||||
void Brush::RenderFill(Renderer * ren, ui::Point position)
|
||||
{
|
||||
|
||||
ren->xor_line(position.X-5, position.Y, position.X-1, position.Y);
|
||||
ren->xor_line(position.X+5, position.Y, position.X+1, position.Y);
|
||||
ren->xor_line(position.X, position.Y-5, position.X, position.Y-1);
|
||||
ren->xor_line(position.X, position.Y+5, position.X, position.Y+1);
|
||||
}
|
||||
|
@ -997,7 +997,7 @@ void GameView::OnMouseMove(int x, int y, int dx, int dy)
|
||||
|
||||
void GameView::OnMouseDown(int x, int y, unsigned button)
|
||||
{
|
||||
if(altBehaviour && !shiftBehaviour)
|
||||
if(altBehaviour && !shiftBehaviour && !ctrlBehaviour)
|
||||
button = BUTTON_MIDDLE;
|
||||
if(selectMode!=SelectNone)
|
||||
{
|
||||
@ -1817,11 +1817,11 @@ void GameView::OnDraw()
|
||||
}
|
||||
activeBrush->RenderLine(ren, c->PointTranslate(initialDrawPoint), finalCurrentMouse);
|
||||
}
|
||||
else if(drawMode==DrawFill)
|
||||
else if(drawMode==DrawFill || altBehaviour)
|
||||
{
|
||||
activeBrush->RenderFill(ren, finalCurrentMouse);
|
||||
}
|
||||
if (drawMode == DrawPoints || drawMode==DrawLine || (drawMode == DrawRect && !isMouseDown))
|
||||
if ((drawMode == DrawPoints || drawMode==DrawLine || (drawMode == DrawRect && !isMouseDown)) && !altBehaviour)
|
||||
{
|
||||
if(wallBrush)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user