From 63f0b730767b1185dc33f8892068d697e26a09bb Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 22 Feb 2014 14:59:26 +0300 Subject: Move Rectangle and ClipRectangle into gui directory. --- src/render/sdl2graphics.cpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'src/render/sdl2graphics.cpp') 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(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(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(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); -- cgit v1.2.3-60-g2f50