diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2016-01-09 12:13:15 +0000 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2016-01-11 10:08:29 +0000 |
commit | dd70c25bda8f7ad8da6e68b6e88fd222cab1a10f (patch) | |
tree | d40948fdcf131ad1813967b6480b05112f88d70e /vcl | |
parent | c332ed4794dc0ae818416b36aa5295a9dd34c9c6 (diff) |
tdf#96657 - vcl opengl: implement invert: Track Frame.
Change-Id: I422ea8cfb8a81cca36203d496b92e15ea5b449d2
Reviewed-on: https://gerrit.libreoffice.org/21289
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/opengl/gdiimpl.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx index 7304a1a8b9e5..b7276edc34ca 100644 --- a/vcl/opengl/gdiimpl.cxx +++ b/vcl/opengl/gdiimpl.cxx @@ -576,6 +576,7 @@ bool OpenGLSalGraphicsImpl::UseInvert( SalInvert nFlags ) if( ( nFlags & SAL_INVERT_50 ) || ( nFlags & SAL_INVERT_TRACKFRAME ) ) { + // FIXME: Trackframe really should be 2 pix. on/off stipple. if( !UseInvert50() ) return false; mpProgram->SetBlendMode( GL_ONE_MINUS_DST_COLOR, @@ -1752,7 +1753,17 @@ void OpenGLSalGraphicsImpl::invert( PreDraw(); if( UseInvert( nFlags ) ) - DrawRect( nX, nY, nWidth, nHeight ); + { + if( nFlags & SAL_INVERT_TRACKFRAME ) + { // FIXME: could be more efficient. + DrawRect( nX, nY, nWidth, 1 ); + DrawRect( nX, nY + nHeight, nWidth, 1 ); + DrawRect( nX, nY, 1, nHeight ); + DrawRect( nX + nWidth, nY, 1, nHeight ); + } + else + DrawRect( nX, nY, nWidth, nHeight ); + } PostDraw(); } |