summaryrefslogtreecommitdiff
path: root/src/game/EllipseBrush.h
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-01-06 01:03:59 (GMT)
committer jacob1 <jfu614@gmail.com>2013-01-06 01:03:59 (GMT)
commit8f4d936de81c15e1ba91a2a4a2e79e039707a121 (patch)
tree97a68b4b28ded9f88d912886c227e073d2e9bbf8 /src/game/EllipseBrush.h
parentbd3011959a936f3b1f6e8cbe744529ea6c171182 (diff)
downloadpowder-8f4d936de81c15e1ba91a2a4a2e79e039707a121.zip
powder-8f4d936de81c15e1ba91a2a4a2e79e039707a121.tar.gz
allow right click to close notifications too
Diffstat (limited to 'src/game/EllipseBrush.h')
-rw-r--r--src/game/EllipseBrush.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/game/EllipseBrush.h b/src/game/EllipseBrush.h
index d6c8b40..80215b5 100644
--- a/src/game/EllipseBrush.h
+++ b/src/game/EllipseBrush.h
@@ -36,16 +36,15 @@ public:
}
else
{
- int yTop = ry, i, j, yBottom;
+ int yTop = ry, yBottom, i, j;
for (i = 0; i <= rx; i++)
{
while (pow(i-rx,2.0f)*pow(ry,2.0f) + pow(yTop-ry,2.0f)*pow(rx,2.0f) <= pow(rx,2.0f)*pow(ry,2.0f))
- yTop = yTop + 1;
- yTop = yTop - 1;
+ yTop++;
yBottom = 2*ry - yTop;
for (int j = 0; j <= ry*2; j++)
{
- if (j >= yBottom && j <= yTop)
+ if (j > yBottom && j < yTop)
{
bitmap[j*(size.X)+i] = 255;
bitmap[j*(size.X)+2*rx-i] = 255;