From 29004117b6dae7b9cdee878a02b8c0e10a033184 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Fri, 15 May 2020 12:07:48 -0300 Subject: [PATCH] Draw operation bounds are Normalized. --- src/Avalonia.Visuals/Rendering/SceneGraph/DrawOperation.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Avalonia.Visuals/Rendering/SceneGraph/DrawOperation.cs b/src/Avalonia.Visuals/Rendering/SceneGraph/DrawOperation.cs index 0b04b97ff2..38df0cb289 100644 --- a/src/Avalonia.Visuals/Rendering/SceneGraph/DrawOperation.cs +++ b/src/Avalonia.Visuals/Rendering/SceneGraph/DrawOperation.cs @@ -11,7 +11,10 @@ namespace Avalonia.Rendering.SceneGraph { public DrawOperation(Rect bounds, Matrix transform) { + bounds = bounds.Normalize(); + bounds = bounds.TransformToAABB(transform); + Bounds = new Rect( new Point(Math.Floor(bounds.X), Math.Floor(bounds.Y)), new Point(Math.Ceiling(bounds.Right), Math.Ceiling(bounds.Bottom)));