From 42cf275606b3618cce838a5939494fbd7493ee25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Wed, 2 Apr 2008 11:04:03 +0000 Subject: [PATCH] The scale of a state does not influence the origin. Only previous states and their origin and scale influences the current state's origin, since they can be regarded as within the parent state's coordinate system. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24740 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/DrawState.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/servers/app/DrawState.cpp b/src/servers/app/DrawState.cpp index 8e2f3bc6fe..892d3ca826 100644 --- a/src/servers/app/DrawState.cpp +++ b/src/servers/app/DrawState.cpp @@ -289,8 +289,7 @@ DrawState::SetOrigin(const BPoint& origin) fCombinedOrigin.y = fPreviousState->fCombinedOrigin.y + fOrigin.y * fPreviousState->fCombinedScale; } else { - fCombinedOrigin.x = fOrigin.x * fCombinedScale; - fCombinedOrigin.y = fOrigin.y * fCombinedScale; + fCombinedOrigin = fOrigin; } } @@ -309,6 +308,8 @@ DrawState::SetScale(float scale) fCombinedScale = fScale; // update font size + // NOTE: This is what makes the call potentially expensive, + // hence the introductory check fFont.SetSize(fUnscaledFontSize * fCombinedScale); } }