summaryrefslogtreecommitdiff
path: root/src/render/modernopenglgraphics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/modernopenglgraphics.cpp')
-rw-r--r--src/render/modernopenglgraphics.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/render/modernopenglgraphics.cpp b/src/render/modernopenglgraphics.cpp
index fd700a9cf..ab8a9a787 100644
--- a/src/render/modernopenglgraphics.cpp
+++ b/src/render/modernopenglgraphics.cpp
@@ -297,9 +297,12 @@ bool ModernOpenGLGraphics::drawImageInline(const Image *const image,
bindTexture(GL_TEXTURE_2D, image->mGLImage);
setTexturingAndBlending(true);
+ const ClipRect &clipArea = mClipStack.top();
const SDL_Rect &imageRect = image->mBounds;
- drawQuad(image, imageRect.x, imageRect.y,
- dstX, dstY, imageRect.w, imageRect.h);
+ drawQuad(image,
+ imageRect.x, imageRect.y,
+ dstX + clipArea.xOffset, dstY + clipArea.yOffset,
+ imageRect.w, imageRect.h);
return true;
}