Browse Source

Remove PixelRect.Default

pull/9590/head
robloo 4 years ago
parent
commit
a799f72242
  1. 2
      samples/ControlCatalog/Pages/ImagePage.xaml.cs
  2. 11
      src/Avalonia.Base/PixelRect.cs

2
samples/ControlCatalog/Pages/ImagePage.xaml.cs

@ -70,7 +70,7 @@ namespace ControlCatalog.Pages
3 => new PixelRect(new PixelPoint(bitmapWidth - cropSize.Width, 0), cropSize),
4 => new PixelRect(new PixelPoint(0, bitmapHeight - cropSize.Height), cropSize),
5 => new PixelRect(new PixelPoint(bitmapWidth - cropSize.Width, bitmapHeight - cropSize.Height), cropSize),
_ => PixelRect.Default
_ => default
};
}

11
src/Avalonia.Base/PixelRect.cs

@ -10,13 +10,10 @@ namespace Avalonia
public readonly struct PixelRect : IEquatable<PixelRect>
{
/// <summary>
/// A shared default instance representing an empty rectangle.
/// An empty rectangle.
/// </summary>
public static readonly PixelRect Default = default;
/// <inheritdoc cref="Default"/>
[Obsolete("Use Default instead.")]
public static readonly PixelRect Empty = Default;
[Obsolete("Use the default keyword instead.")]
public static readonly PixelRect Empty = default;
/// <summary>
/// Initializes a new instance of the <see cref="PixelRect"/> structure.
@ -265,7 +262,7 @@ namespace Avalonia
}
else
{
return Default;
return default;
}
}

Loading…
Cancel
Save