summaryrefslogtreecommitdiff
path: root/vcl/opengl
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-07-06 20:06:31 +0900
committerTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-07-09 10:09:17 +0900
commita1385d37e9ffc84b82e9ee11e505bba6273823dc (patch)
tree6b9a85c252668a13ab1fe9e6a3bd01133a11901b /vcl/opengl
parent9125549453e3038eddafc3c89bc830a5e40953b4 (diff)
opengl: adjust rect drawing - should be to width (height) - 1
Might be the cause of Rectangle implementation of GetWidth and GetHeight which is different to other programs. X11 backend compensates in the same way for this use case. Change-Id: Ibc3c1d6f442d616c64b602cccb601bfc33fd4baf
Diffstat (limited to 'vcl/opengl')
-rw-r--r--vcl/opengl/gdiimpl.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 012ba9de5567..e9ad376aa426 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -1190,8 +1190,8 @@ void OpenGLSalGraphicsImpl::drawRect( long nX, long nY, long nWidth, long nHeigh
{
GLfloat fX1 = OPENGL_COORD_X(nX);
GLfloat fY1 = OPENGL_COORD_Y(nY);
- GLfloat fX2 = OPENGL_COORD_X(nX + nWidth);
- GLfloat fY2 = OPENGL_COORD_Y(nY + nHeight);
+ GLfloat fX2 = OPENGL_COORD_X(nX + nWidth - 1);
+ GLfloat fY2 = OPENGL_COORD_Y(nY + nHeight - 1);
GLfloat pPoints[16];