Kaydet (Commit) 60790935 authored tarafından Michael Meeks's avatar Michael Meeks

tdf#96657 - vcl opengl: implement invert: Track Frame.

Change-Id: I422ea8cfb8a81cca36203d496b92e15ea5b449d2
Reviewed-on: https://gerrit.libreoffice.org/21291Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMichael Meeks <michael.meeks@collabora.com>
üst 7ede462d
...@@ -576,6 +576,7 @@ bool OpenGLSalGraphicsImpl::UseInvert( SalInvert nFlags ) ...@@ -576,6 +576,7 @@ bool OpenGLSalGraphicsImpl::UseInvert( SalInvert nFlags )
if( ( nFlags & SAL_INVERT_50 ) || if( ( nFlags & SAL_INVERT_50 ) ||
( nFlags & SAL_INVERT_TRACKFRAME ) ) ( nFlags & SAL_INVERT_TRACKFRAME ) )
{ {
// FIXME: Trackframe really should be 2 pix. on/off stipple.
if( !UseInvert50() ) if( !UseInvert50() )
return false; return false;
mpProgram->SetBlendMode( GL_ONE_MINUS_DST_COLOR, mpProgram->SetBlendMode( GL_ONE_MINUS_DST_COLOR,
...@@ -1757,7 +1758,17 @@ void OpenGLSalGraphicsImpl::invert( ...@@ -1757,7 +1758,17 @@ void OpenGLSalGraphicsImpl::invert(
PreDraw(); PreDraw();
if( UseInvert( nFlags ) ) 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(); PostDraw();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment