ServerWindow: Fix converting the clip picture origin

The current view state is already used for the picture playback, the
remaining conversion needs to take into account screen location and scrolling
offset of the view. This may need further investigation: a) When is this
updated? It needs to be whenever a View changes screen location, size or scroll
offset, which may not be the times when this method is called. b) I am not
sure if the scrolling offset is indeed part of this conversion...
This commit is contained in:
Stephan Aßmus 2014-02-01 10:34:23 +01:00
parent b58b8cdd30
commit 6a6060d8fe
1 changed files with 5 additions and 2 deletions

View File

@ -3626,9 +3626,12 @@ ServerWindow::_UpdateDrawState(View* view)
DrawingEngine* drawingEngine = fWindow->GetDrawingEngine();
if (view != NULL && drawingEngine != NULL) {
BPoint leftTop(0, 0);
if (view->GetAlphaMask() != NULL) {
view->ConvertToScreen(&leftTop);
view->GetAlphaMask()->Update(view->Bounds(), leftTop);
leftTop = BPoint(0, 0);
}
view->ConvertToScreenForDrawing(&leftTop);
if (view->GetAlphaMask() != NULL)
view->GetAlphaMask()->Update(view->Bounds(), leftTop);
drawingEngine->SetDrawState(view->CurrentState(), leftTop.x, leftTop.y);
}
}