summaryrefslogtreecommitdiff
path: root/src/render/graphics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/graphics.cpp')
-rw-r--r--src/render/graphics.cpp64
1 files changed, 0 insertions, 64 deletions
diff --git a/src/render/graphics.cpp b/src/render/graphics.cpp
index c83595b56..abb696bc9 100644
--- a/src/render/graphics.cpp
+++ b/src/render/graphics.cpp
@@ -440,70 +440,6 @@ int Graphics::getHeight() const
return mHeight;
}
-void Graphics::drawImageRect(const int x, const int y,
- const int w, const int h,
- const ImageRect &imgRect)
-{
- BLOCK_START("Graphics::drawImageRect")
-
- const Image *const *const grid = imgRect.grid;
- const Image *const topLeft = grid[0];
- const Image *const topRight = grid[2];
- const Image *const bottomLeft = grid[6];
- const Image *const bottomRight = grid[8];
- const Image *const top = grid[1];
- const Image *const right = grid[5];
- const Image *const bottom = grid[7];
- const Image *const left = grid[3];
- const Image *const center = grid[4];
-
- const bool drawMain = center && topLeft && topRight
- && bottomLeft && bottomRight;
-
- // Draw the center area
- if (center && drawMain)
- {
- const int tlw = topLeft->getWidth();
- const int tlh = topLeft->getHeight();
- drawPattern(center, tlw + x, tlh + y,
- w - tlw - topRight->getWidth(),
- h - tlh - bottomLeft->getHeight());
- }
-
- // Draw the sides
- if (top && left && bottom && right)
- {
- const int lw = left->getWidth();
- const int rw = right->getWidth();
- const int th = top->getHeight();
- const int bh = bottom->getHeight();
- drawPattern(top, x + lw, y, w - lw - rw, th);
- drawPattern(bottom, x + lw, h - bh + y, w - lw - rw, bh);
- drawPattern(left, x, y + th, lw, h - th - bh);
- if (w > rw)
- drawPattern(right, x + w - rw, th + y, rw, h - th - bh);
- }
- // Draw the corners
- if (drawMain)
- {
- drawImage2(topLeft, x, y);
- const int trw = topRight->getWidth();
- if (w > trw)
- {
- drawImage2(topRight, x + w - trw, y);
- }
- drawImage2(bottomLeft, x, h - bottomLeft->getHeight() + y);
- const int brw = bottomRight->getWidth();
- if (w > brw)
- {
- drawImage2(bottomRight,
- x + w - brw,
- y + h - bottomRight->getHeight());
- }
- }
- BLOCK_END("Graphics::drawImageRect")
-}
-
bool Graphics::drawNet(const int x1, const int y1, const int x2, const int y2,
const int width, const int height)
{