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:
parent
b58b8cdd30
commit
6a6060d8fe
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user