summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-07-03 12:44:34 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-07-03 12:44:34 (GMT)
commite5f96cd3c97833bea60e562e810cc9c66e018172 (patch)
tree10a49a75a06d805e8dacac41109617e71736d1d7 /src
parent62e11c23b28e023529c5d32f62800a5c4fe1fc39 (diff)
downloadpowder-e5f96cd3c97833bea60e562e810cc9c66e018172.zip
powder-e5f96cd3c97833bea60e562e810cc9c66e018172.tar.gz
Add missing RenderFill function for brushes
Diffstat (limited to 'src')
-rw-r--r--src/game/Brush.h4
-rw-r--r--src/game/GameView.cpp4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/game/Brush.h b/src/game/Brush.h
index 0adcd95..1b7cf69 100644
--- a/src/game/Brush.h
+++ b/src/game/Brush.h
@@ -106,6 +106,10 @@ public:
return;
g->xor_bitmap(outline, position.X-radius.X, position.Y-radius.Y, size.X, size.Y);
}
+ virtual void RenderFill(Graphics * g, ui::Point position)
+ {
+ //Do nothing for now - possibly draw some sort of flood fill mask
+ }
virtual void GenerateBitmap()
{
if(bitmap)
diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp
index 8216d9b..7d3e0c9 100644
--- a/src/game/GameView.cpp
+++ b/src/game/GameView.cpp
@@ -1068,6 +1068,10 @@ void GameView::OnDraw()
}
activeBrush->RenderLine(g, c->PointTranslate(drawPoint1), finalCurrentMouse);
}
+ else if(drawMode==DrawFill)
+ {
+ activeBrush->RenderFill(g, finalCurrentMouse);
+ }
else
{
activeBrush->RenderPoint(g, finalCurrentMouse);