Browse Source

Draw operation bounds are Normalized.

pull/3948/head
Dan Walmsley 7 years ago
parent
commit
29004117b6
  1. 3
      src/Avalonia.Visuals/Rendering/SceneGraph/DrawOperation.cs

3
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)));

Loading…
Cancel
Save