From 48882cec96de1f4391f1882cac61524466c462c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Sat, 8 Dec 2007 22:59:04 +0000 Subject: [PATCH] * lock pattern drawing to the true view origin, independend of the views position on screen (fixes drawing glitches in patterns when the view was moved on screen (for example because the parent window got moved)) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23089 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/ServerPicture.cpp | 4 ++-- src/servers/app/ServerWindow.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/servers/app/ServerPicture.cpp b/src/servers/app/ServerPicture.cpp index fc2fafb1ca..51d1acd2ef 100644 --- a/src/servers/app/ServerPicture.cpp +++ b/src/servers/app/ServerPicture.cpp @@ -467,8 +467,8 @@ pop_state(ViewLayer *view) { view->PopState(); - IntPoint p = view->ScrollingOffset(); - p += IntPoint(view->CurrentState()->Origin()); + BPoint p(0, 0); + view->ConvertToScreenForDrawing(&p); view->Window()->GetDrawingEngine()->SetDrawState( view->CurrentState(), p.x, p.y); } diff --git a/src/servers/app/ServerWindow.cpp b/src/servers/app/ServerWindow.cpp index 52a99d5d05..794e23b270 100644 --- a/src/servers/app/ServerWindow.cpp +++ b/src/servers/app/ServerWindow.cpp @@ -3179,8 +3179,8 @@ ServerWindow::_UpdateDrawState(ViewLayer* layer) // "offsets" passed below would need to be updated again DrawingEngine* drawingEngine = fWindowLayer->GetDrawingEngine(); if (layer && drawingEngine) { - IntPoint p = layer->ScrollingOffset(); - p += IntPoint(layer->CurrentState()->Origin()); + BPoint p(0, 0); + layer->ConvertToScreenForDrawing(&p); drawingEngine->SetDrawState(layer->CurrentState(), p.x, p.y); } }