Kaydet (Commit) 79c9598d authored tarafından Miklos Vajna's avatar Miklos Vajna

tdf#92982 vcl::Cursor: handle rendercontext

With this, vcl::Cursor does not paint on the vcl::Window directly, and
in case the output should be something other than pRenderContext, it
should be a one-liner change to do that.

Change-Id: I57833f6f8589286260d96f412f1fcc681e6c5c8c
üst 2d4223e3
...@@ -44,8 +44,9 @@ struct ImplCursorData ...@@ -44,8 +44,9 @@ struct ImplCursorData
static void ImplCursorInvert( ImplCursorData* pData ) static void ImplCursorInvert( ImplCursorData* pData )
{ {
vcl::Window* pWindow = pData->mpWindow; vcl::Window* pWindow = pData->mpWindow;
bool bMapMode = pWindow->IsMapModeEnabled(); vcl::RenderContext* pRenderContext = pWindow->GetOutDev();
pWindow->EnableMapMode( false ); bool bMapMode = pRenderContext->IsMapModeEnabled();
pRenderContext->EnableMapMode( false );
InvertFlags nInvertStyle; InvertFlags nInvertStyle;
if ( pData->mnStyle & CURSOR_SHADOW ) if ( pData->mnStyle & CURSOR_SHADOW )
nInvertStyle = InvertFlags::N50; nInvertStyle = InvertFlags::N50;
...@@ -107,12 +108,12 @@ static void ImplCursorInvert( ImplCursorData* pData ) ...@@ -107,12 +108,12 @@ static void ImplCursorInvert( ImplCursorData* pData )
if ( pData->mnOrientation ) if ( pData->mnOrientation )
aPoly.Rotate( pData->maPixRotOff, pData->mnOrientation ); aPoly.Rotate( pData->maPixRotOff, pData->mnOrientation );
pWindow->Invert( aPoly, nInvertStyle ); pRenderContext->Invert( aPoly, nInvertStyle );
} }
} }
else else
pWindow->Invert( aRect, nInvertStyle ); pRenderContext->Invert( aRect, nInvertStyle );
pWindow->EnableMapMode( bMapMode ); pRenderContext->EnableMapMode( bMapMode );
} }
void vcl::Cursor::ImplDraw() void vcl::Cursor::ImplDraw()
......
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