summaryrefslogtreecommitdiff
path: root/src/graphics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/graphics.cpp')
-rw-r--r--src/graphics.cpp23
1 files changed, 2 insertions, 21 deletions
diff --git a/src/graphics.cpp b/src/graphics.cpp
index 5455f61a..c5b86bc6 100644
--- a/src/graphics.cpp
+++ b/src/graphics.cpp
@@ -21,27 +21,8 @@
#include "graphics.h"
-#include "resources/image.h"
-
#include <guichan/exception.hpp>
-#include <utility>
-
-ImageRect::ImageRect(ImageRect &&r)
-{
- image = std::exchange(r.image, nullptr);
- top = r.top;
- left = r.left;
- bottom = r.bottom;
- right = r.right;
- fillMode = r.fillMode;
-}
-
-ImageRect::~ImageRect()
-{
- delete image;
-}
-
void Graphics::updateSize(int width, int height, float /*scale*/)
{
@@ -166,7 +147,7 @@ void Graphics::drawImageRect(const ImageRect &imgRect, int x, int y, int w, int
switch (imgRect.fillMode)
{
case FillMode::Stretch:
- drawRescaledImage(imgRect.image,
+ drawRescaledImage(imgRect.image.get(),
srcGridX[ix],
srcGridY[iy],
dstGridX[ix],
@@ -175,7 +156,7 @@ void Graphics::drawImageRect(const ImageRect &imgRect, int x, int y, int w, int
dstW, dstH);
break;
case FillMode::Repeat:
- drawRescaledImagePattern(imgRect.image,
+ drawRescaledImagePattern(imgRect.image.get(),
srcGridX[ix],
srcGridY[iy],
srcW, srcH,