vcl/opengl/gdiimpl.cxx | 3 ++- vcl/opengl/texture.cxx | 4 ++++ vcl/workben/vcldemo.cxx | 16 ++++++++++++++-- 3 files changed, 20 insertions(+), 3 deletions(-)
New commits: commit 8d47d7a6be0fbc577686a9e918f087a2bf7602fc Author: Michael Meeks <[email protected]> Date: Fri Nov 7 12:33:15 2014 +0000 vcldemo - test the drawAlphaRect method. Change-Id: I05e62b57c9b1cbdd89dc32b73b9dbcccc26a3c65 diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx index 868728d..6d794ef 100644 --- a/vcl/opengl/gdiimpl.cxx +++ b/vcl/opengl/gdiimpl.cxx @@ -734,7 +734,8 @@ void OpenGLSalGraphicsImpl::drawMask( SalBitmap* OpenGLSalGraphicsImpl::getBitmap( long nX, long nY, long nWidth, long nHeight ) { OpenGLSalBitmap* pBitmap = new OpenGLSalBitmap; - SAL_INFO( "vcl.opengl", "::getBitmap" ); + SAL_INFO( "vcl.opengl", "::getBitmap " << nX << "," << nY << + " " << nWidth << "x" << nHeight ); if( !pBitmap->Create( maContext, nX, nY, nWidth, nHeight ) ) { delete pBitmap; diff --git a/vcl/opengl/texture.cxx b/vcl/opengl/texture.cxx index ad1b8c9..2770c20 100644 --- a/vcl/opengl/texture.cxx +++ b/vcl/opengl/texture.cxx @@ -18,6 +18,8 @@ */ #include <sal/config.h> +#include <vcl/opengl/OpenGLHelper.hxx> + #include "vcl/salbtype.hxx" #include "opengl/texture.hxx" @@ -59,7 +61,9 @@ OpenGLTexture::OpenGLTexture( int nX, int nY, int nWidth, int nHeight ) glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST ); glCopyTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, nX, nY, nWidth, nHeight, 0 ); + CHECK_GL_ERROR(); glBindTexture( GL_TEXTURE_2D, 0 ); + CHECK_GL_ERROR(); } OpenGLTexture::OpenGLTexture( int nWidth, int nHeight, int nFormat, int nType, sal_uInt8* pData ) diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index 65f143d..b58c70f 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -97,9 +97,21 @@ public: void drawPoly(Rectangle r) // pretty { - Polygon aPoly(r, r.TopLeft(), r.TopRight()); + drawCheckered(r); + + long nDx = r.GetWidth()/20; + long nDy = r.GetHeight()/20; + Rectangle aShrunk(r); + aShrunk.Move(nDx, nDy); + aShrunk.SetSize(Size(r.GetWidth()-nDx*2, + r.GetHeight()-nDy*2)); + Polygon aPoly(aShrunk); + tools::PolyPolygon aPPoly(aPoly); SetLineColor(Color(COL_RED)); -// DrawPolyLine(aPoly); + SetFillColor(Color(COL_RED)); + // This hits the 'drawAlphaRect' code-path + // FIXME: not alpha ... + DrawTransparent(aPPoly, 64); } void drawEllipse(Rectangle r) { _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
