diff options
-rw-r--r-- | src/render/modernopenglgraphics.cpp | 7 | ||||
-rw-r--r-- | src/test/testlauncher.cpp | 2 |
2 files changed, 6 insertions, 3 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; } diff --git a/src/test/testlauncher.cpp b/src/test/testlauncher.cpp index 462e46716..433d5ad42 100644 --- a/src/test/testlauncher.cpp +++ b/src/test/testlauncher.cpp @@ -380,7 +380,7 @@ int TestLauncher::testDraw() mainGraphics->drawRectangle(Rect(0, 0, 400, 200)); mainGraphics->setColor(Color(0xFFU, 0x00U, 0x00U, 0xB0U)); - mainGraphics->drawImage(img[0], 190, 403); + mainGraphics->drawImage(img[0], 190, 383); mainGraphics->setColor(Color(0x80U, 0x00U, 0xA0U, 0x90U)); mainGraphics->fillRectangle(Rect(200, 100, 300, 300)); |