summaryrefslogtreecommitdiff
path: root/src/render/sdl2graphics.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-02-22 14:59:26 +0300
committerAndrei Karas <akaras@inbox.ru>2014-02-22 14:59:26 +0300
commit63f0b730767b1185dc33f8892068d697e26a09bb (patch)
tree9f3bcba891cb747b2b4696651b8df464a8a1fc86 /src/render/sdl2graphics.cpp
parent48646db55005a0da079bd2c945875dc8225e2f86 (diff)
downloadmv-63f0b730767b1185dc33f8892068d697e26a09bb.tar.gz
mv-63f0b730767b1185dc33f8892068d697e26a09bb.tar.bz2
mv-63f0b730767b1185dc33f8892068d697e26a09bb.tar.xz
mv-63f0b730767b1185dc33f8892068d697e26a09bb.zip
Move Rectangle and ClipRectangle into gui directory.
Diffstat (limited to 'src/render/sdl2graphics.cpp')
-rw-r--r--src/render/sdl2graphics.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/render/sdl2graphics.cpp b/src/render/sdl2graphics.cpp
index 933120080..053049cef 100644
--- a/src/render/sdl2graphics.cpp
+++ b/src/render/sdl2graphics.cpp
@@ -136,7 +136,7 @@ bool SDLGraphics::drawRescaledImage(const Image *const image,
if (!image->mTexture)
return false;
- const gcn::ClipRectangle &top = mClipStack.top();
+ const ClipRectangle &top = mClipStack.top();
const SDL_Rect &bounds = image->mBounds;
const SDL_Rect srcRect =
{
@@ -171,7 +171,7 @@ bool SDLGraphics::drawImageInline(const Image *const image,
if (!mWindow || !image || !image->mTexture)
return false;
- const gcn::ClipRectangle &top = mClipStack.top();
+ const ClipRectangle &top = mClipStack.top();
if (!top.width || !top.height)
return false;
@@ -203,7 +203,7 @@ void SDLGraphics::drawImageCached(const Image *const image,
if (!mWindow || !image || !image->mTexture)
return;
- const gcn::ClipRectangle &top = mClipStack.top();
+ const ClipRectangle &top = mClipStack.top();
if (!top.width || !top.height)
return;
@@ -238,7 +238,7 @@ void SDLGraphics::drawPatternCached(const Image *const image,
if (!image->mTexture)
return;
- const gcn::ClipRectangle &top = mClipStack.top();
+ const ClipRectangle &top = mClipStack.top();
if (!top.width || !top.height)
return;
@@ -296,7 +296,7 @@ void SDLGraphics::drawPatternInline(const Image *const image,
if (!image->mTexture)
return;
- const gcn::ClipRectangle &top = mClipStack.top();
+ const ClipRectangle &top = mClipStack.top();
if (!top.width || !top.height)
return;
@@ -347,7 +347,7 @@ void SDLGraphics::drawRescaledPattern(const Image *const image,
if (scaledHeight == 0 || scaledWidth == 0)
return;
- const gcn::ClipRectangle &top = mClipStack.top();
+ const ClipRectangle &top = mClipStack.top();
if (!top.width || !top.height)
return;
@@ -407,7 +407,7 @@ void SDLGraphics::calcPatternInline(ImageVertexes* const vert,
if (!vert || !mWindow || !image || !image->mTexture)
return;
- const gcn::ClipRectangle &top = mClipStack.top();
+ const ClipRectangle &top = mClipStack.top();
if (!top.width || !top.height)
return;
@@ -492,7 +492,7 @@ void SDLGraphics::calcTileSDL(ImageVertexes *const vert, int x, int y) const
if (!vert || !vert->image || !vert->image->mTexture)
return;
- const gcn::ClipRectangle &top = mClipStack.top();
+ const ClipRectangle &top = mClipStack.top();
if (!top.width || !top.height)
return;
@@ -638,9 +638,9 @@ void SDLGraphics::calcWindow(ImageCollection *const vertCol,
calcImageRect(vert, x, y, w, h, imgRect);
}
-void SDLGraphics::fillRectangle(const gcn::Rectangle &rectangle)
+void SDLGraphics::fillRectangle(const Rectangle &rectangle)
{
- const gcn::ClipRectangle &top = mClipStack.top();
+ const ClipRectangle &top = mClipStack.top();
const SDL_Rect rect =
{
static_cast<int32_t>(rectangle.x + top.xOffset),
@@ -655,7 +655,7 @@ void SDLGraphics::fillRectangle(const gcn::Rectangle &rectangle)
void SDLGraphics::_beginDraw()
{
- pushClipArea(gcn::Rectangle(0, 0, mRect.w, mRect.h));
+ pushClipArea(Rectangle(0, 0, mRect.w, mRect.h));
}
void SDLGraphics::_endDraw()
@@ -663,11 +663,11 @@ void SDLGraphics::_endDraw()
popClipArea();
}
-bool SDLGraphics::pushClipArea(gcn::Rectangle area)
+bool SDLGraphics::pushClipArea(Rectangle area)
{
const bool result = Graphics::pushClipArea(area);
- const gcn::ClipRectangle &carea = mClipStack.top();
+ const ClipRectangle &carea = mClipStack.top();
const SDL_Rect rect =
{
static_cast<int32_t>(carea.x),
@@ -686,7 +686,7 @@ void SDLGraphics::popClipArea()
if (mClipStack.empty())
return;
- const gcn::ClipRectangle &carea = mClipStack.top();
+ const ClipRectangle &carea = mClipStack.top();
const SDL_Rect rect =
{
static_cast<int32_t>(carea.x),
@@ -703,7 +703,7 @@ void SDLGraphics::drawPoint(int x, int y)
if (mClipStack.empty())
return;
- const gcn::ClipRectangle &top = mClipStack.top();
+ const ClipRectangle &top = mClipStack.top();
x += top.xOffset;
y += top.yOffset;
@@ -722,9 +722,9 @@ void SDLGraphics::drawPoint(int x, int y)
}
-void SDLGraphics::drawRectangle(const gcn::Rectangle &rectangle)
+void SDLGraphics::drawRectangle(const Rectangle &rectangle)
{
- const gcn::ClipRectangle &top = mClipStack.top();
+ const ClipRectangle &top = mClipStack.top();
SDL_SetRenderDrawColor(mRenderer, mColor.r, mColor.g, mColor.b, mColor.a);
@@ -746,7 +746,7 @@ void SDLGraphics::drawRectangle(const gcn::Rectangle &rectangle)
void SDLGraphics::drawLine(int x1, int y1, int x2, int y2)
{
- const gcn::ClipRectangle &top = mClipStack.top();
+ const ClipRectangle &top = mClipStack.top();
SDL_SetRenderDrawColor(mRenderer, mColor.r, mColor.g, mColor.b, mColor.a);