Browse Source

Merge branch 'master' into renderer-lock-allocations

pull/2918/head
Dariusz Komosiński 7 years ago
committed by GitHub
parent
commit
a20b519458
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/Avalonia.Visuals/Rect.cs

4
src/Avalonia.Visuals/Rect.cs

@ -371,12 +371,12 @@ namespace Avalonia
/// <returns>The bounding box</returns> /// <returns>The bounding box</returns>
public Rect TransformToAABB(Matrix matrix) public Rect TransformToAABB(Matrix matrix)
{ {
var points = new[] ReadOnlySpan<Point> points = stackalloc Point[4]
{ {
TopLeft.Transform(matrix), TopLeft.Transform(matrix),
TopRight.Transform(matrix), TopRight.Transform(matrix),
BottomRight.Transform(matrix), BottomRight.Transform(matrix),
BottomLeft.Transform(matrix), BottomLeft.Transform(matrix)
}; };
var left = double.MaxValue; var left = double.MaxValue;

Loading…
Cancel
Save