Sync the drawing engine state in set_scale. The pen size, for example,

needs to be recalculated when the scale changes.
Also call ResyncDrawingState() in exit_state_change(). This fixes the 
pen size test in FlattenTestPicture.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22215 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2007-09-10 11:56:28 +00:00
parent b1af0a7a24
commit 945d8d11cd
1 changed files with 5 additions and 5 deletions

View File

@ -485,6 +485,7 @@ enter_state_change(ViewLayer *view)
static void
exit_state_change(ViewLayer *view)
{
view->Window()->ServerWindow()->ResyncDrawState();
}
@ -575,11 +576,10 @@ static void
set_scale(ViewLayer *view, float scale)
{
view->CurrentState()->SetScale(scale);
// the DrawingEngine/Painter does not need to be updated, since this
// effects only the view->screen coord conversion, which is handled
// by the view only
// TODO: (JackBurton) What about the pen size ? Since it depends on the scale,
// Don't we need to tell the drawing engine about it ?
view->Window()->ServerWindow()->ResyncDrawState();
// Update the drawing engine draw state, since some stuff (for example
// the pen size) needs to be recalculated.
}