diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-05-15 19:01:20 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-05-15 19:01:20 (GMT) |
| commit | bbf7851596988467632e4d3497cc4df224fa53b1 (patch) | |
| tree | f63a17c13c4aa28208723f0468785eac972c1025 /src/game/Brush.h | |
| parent | ba5efb101e30c75e9d1a639a717f48767785982d (diff) | |
| download | powder-bbf7851596988467632e4d3497cc4df224fa53b1.zip powder-bbf7851596988467632e4d3497cc4df224fa53b1.tar.gz | |
Seperate new/old CreateParts functions
Diffstat (limited to 'src/game/Brush.h')
| -rw-r--r-- | src/game/Brush.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/game/Brush.h b/src/game/Brush.h index 656f9f3..bb6df74 100644 --- a/src/game/Brush.h +++ b/src/game/Brush.h @@ -47,14 +47,26 @@ public: { SetRadius(size_); }; + + //Radius of the brush 0x0 - infxinf (Radius of 0x0 would be 1x1, radius of 1x1 would be 3x3) ui::Point GetRadius() { return radius; } + + //Size of the brush bitmap mask, 1x1 - infxinf + ui::Point GetSize() + { + return size; + } void SetRadius(ui::Point radius) { this->radius = radius; this->size = radius+radius+ui::Point(1, 1); + + std::cout << "Radius: " << radius.X << " " << radius.Y << std::endl; + std::cout << "Size: " << size.X << " " << size.Y << std::endl; + GenerateBitmap(); updateOutline(); } @@ -95,7 +107,7 @@ public: updateOutline(); if(!outline) return; - g->xor_bitmap(outline, position.X-radius.X, position.Y-radius.Y-1, size.X, size.Y); + g->xor_bitmap(outline, position.X-radius.X, position.Y-radius.Y, size.X, size.Y); } virtual void GenerateBitmap() { |
