summaryrefslogtreecommitdiff
path: root/src/graphics.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-09-10 20:24:23 +0300
committerAndrei Karas <akaras@inbox.ru>2011-09-10 20:57:14 +0300
commitdba5ec4c1f249599a5f718fe4e532c66e917ffa9 (patch)
tree93f7147d25d8d99d15c579f4f3f58c961c120def /src/graphics.cpp
parenta99352987c2a48012dccd6aeb6c6474b9fce1bdd (diff)
downloadmanaplus-dba5ec4c1f249599a5f718fe4e532c66e917ffa9.tar.gz
manaplus-dba5ec4c1f249599a5f718fe4e532c66e917ffa9.tar.bz2
manaplus-dba5ec4c1f249599a5f718fe4e532c66e917ffa9.tar.xz
manaplus-dba5ec4c1f249599a5f718fe4e532c66e917ffa9.zip
Remove some push/pop clip areas.
Diffstat (limited to 'src/graphics.cpp')
-rw-r--r--src/graphics.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/graphics.cpp b/src/graphics.cpp
index 61f98b2a7..37fd72c08 100644
--- a/src/graphics.cpp
+++ b/src/graphics.cpp
@@ -346,7 +346,7 @@ void Graphics::drawImageRect(int x, int y, int w, int h,
Image *bottom, Image *left,
Image *center)
{
- pushClipArea(gcn::Rectangle(x, y, w, h));
+// pushClipArea(gcn::Rectangle(x, y, w, h));
const bool drawMain = center && topLeft && topRight
&& bottomLeft && bottomRight;
@@ -355,7 +355,7 @@ void Graphics::drawImageRect(int x, int y, int w, int h,
if (center && drawMain)
{
drawImagePattern(center,
- topLeft->getWidth(), topLeft->getHeight(),
+ topLeft->getWidth() + x, topLeft->getHeight() + y,
w - topLeft->getWidth() - topRight->getWidth(),
h - topLeft->getHeight() - bottomLeft->getHeight());
}
@@ -364,18 +364,18 @@ void Graphics::drawImageRect(int x, int y, int w, int h,
if (top && left && bottom && right)
{
drawImagePattern(top,
- left->getWidth(), 0,
+ x + left->getWidth(), y,
w - left->getWidth() - right->getWidth(), top->getHeight());
drawImagePattern(bottom,
- left->getWidth(), h - bottom->getHeight(),
+ x + left->getWidth(), h - bottom->getHeight() + y,
w - left->getWidth() - right->getWidth(),
bottom->getHeight());
drawImagePattern(left,
- 0, top->getHeight(),
+ x, y + top->getHeight(),
left->getWidth(),
h - top->getHeight() - bottom->getHeight());
drawImagePattern(right,
- w - right->getWidth(), top->getHeight(),
+ x + w - right->getWidth(), top->getHeight() + y,
right->getWidth(),
h - top->getHeight() - bottom->getHeight());
}
@@ -383,15 +383,15 @@ void Graphics::drawImageRect(int x, int y, int w, int h,
// Draw the corners
if (drawMain)
{
- drawImage(topLeft, 0, 0);
- drawImage(topRight, w - topRight->getWidth(), 0);
- drawImage(bottomLeft, 0, h - bottomLeft->getHeight());
+ drawImage(topLeft, x, y);
+ drawImage(topRight, x + w - topRight->getWidth(), y);
+ drawImage(bottomLeft, x, h - bottomLeft->getHeight() + y);
drawImage(bottomRight,
- w - bottomRight->getWidth(),
- h - bottomRight->getHeight());
+ x + w - bottomRight->getWidth(),
+ y + h - bottomRight->getHeight());
}
- popClipArea();
+// popClipArea();
}
void Graphics::drawImageRect(int x, int y, int w, int h,