diff options
-rw-r--r-- | vcl/opengl/gdiimpl.cxx | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx index 292a1ca0da84..183a3fe7fda3 100644 --- a/vcl/opengl/gdiimpl.cxx +++ b/vcl/opengl/gdiimpl.cxx @@ -1826,12 +1826,25 @@ bool OpenGLSalGraphicsImpl::drawAlphaBitmap( const OpenGLSalBitmap& rBitmap = static_cast<const OpenGLSalBitmap&>(rSalBitmap); const OpenGLSalBitmap& rAlpha = static_cast<const OpenGLSalBitmap&>(rAlphaBitmap); - OpenGLTexture& rTexture( rBitmap.GetTexture() ); - OpenGLTexture& rAlphaTex( rAlpha.GetTexture() ); + OpenGLTexture& rTexture(rBitmap.GetTexture()); + OpenGLTexture& rAlphaTexture(rAlpha.GetTexture()); VCL_GL_INFO( "::drawAlphaBitmap" ); PreDraw(); - DrawTextureWithMask( rTexture, rAlphaTex, rPosAry ); + + if (rPosAry.mnSrcWidth != rPosAry.mnDestWidth || + rPosAry.mnSrcHeight != rPosAry.mnDestHeight) + { + basegfx::B2DPoint aNull(rPosAry.mnDestX,rPosAry.mnDestY); + basegfx::B2DPoint aX(rPosAry.mnDestX + rPosAry.mnDestWidth, rPosAry.mnDestY); + basegfx::B2DPoint aY(rPosAry.mnDestX, rPosAry.mnDestY + rPosAry.mnDestHeight); + DrawTransformedTexture(rTexture, rAlphaTexture, aNull, aX, aY); + } + else + { + DrawTextureWithMask( rTexture, rAlphaTexture, rPosAry ); + } + PostDraw(); return true; } |