Skip to content

Commit abe0fe3

Browse files
committed
Move GetRasterizationScaleForElement out of loop
1 parent 27f440a commit abe0fe3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/TitleBar/src/TitleBar.WASDK.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,12 @@ public void SetDragRegion(NonClientRegionKind nonClientRegionKind, params Framew
138138
{
139139
var nonClientInputSrc = InputNonClientPointerSource.GetForWindowId(Window.AppWindow.Id);
140140
List<Windows.Graphics.RectInt32> rects = new List<Windows.Graphics.RectInt32>();
141-
141+
var scale = GetRasterizationScaleForElement(this);
142+
142143
foreach (var frameworkElement in frameworkElements)
143144
{
144145
GeneralTransform transformElement = frameworkElement.TransformToVisual(null);
145146
Windows.Foundation.Rect bounds = transformElement.TransformBounds(new Windows.Foundation.Rect(0, 0, frameworkElement.ActualWidth, frameworkElement.ActualHeight));
146-
var scale = GetRasterizationScaleForElement(this);
147147
var transparentRect = new Windows.Graphics.RectInt32(
148148
_X: (int)Math.Round(bounds.X * scale),
149149
_Y: (int)Math.Round(bounds.Y * scale),

0 commit comments

Comments
 (0)