Browse Source

fix nits.

pull/5800/head
Dan Walmsley 5 years ago
parent
commit
fec55f3f27
  1. 4
      src/Avalonia.Visuals/Media/Imaging/WriteableBitmap.cs
  2. 6
      src/Avalonia.Visuals/Platform/IPlatformRenderInterface.cs
  3. 4
      src/Skia/Avalonia.Skia/WriteableBitmapImpl.cs

4
src/Avalonia.Visuals/Media/Imaging/WriteableBitmap.cs

@ -59,7 +59,7 @@ namespace Avalonia.Media.Imaging
/// <param name="width">The desired width of the resulting bitmap.</param>
/// <param name="interpolationMode">The <see cref="BitmapInterpolationMode"/> to use should any scaling be required.</param>
/// <returns>An instance of the <see cref="Bitmap"/> class.</returns>
public static Bitmap DecodeToWidth(Stream stream, int width, BitmapInterpolationMode interpolationMode = BitmapInterpolationMode.HighQuality)
public new static WriteableBitmap DecodeToWidth(Stream stream, int width, BitmapInterpolationMode interpolationMode = BitmapInterpolationMode.HighQuality)
{
var ri = AvaloniaLocator.Current.GetService<IPlatformRenderInterface>();
@ -74,7 +74,7 @@ namespace Avalonia.Media.Imaging
/// <param name="height">The desired height of the resulting bitmap.</param>
/// <param name="interpolationMode">The <see cref="BitmapInterpolationMode"/> to use should any scaling be required.</param>
/// <returns>An instance of the <see cref="Bitmap"/> class.</returns>
public static Bitmap DecodeToHeight(Stream stream, int height, BitmapInterpolationMode interpolationMode = BitmapInterpolationMode.HighQuality)
public new static WriteableBitmap DecodeToHeight(Stream stream, int height, BitmapInterpolationMode interpolationMode = BitmapInterpolationMode.HighQuality)
{
var ri = AvaloniaLocator.Current.GetService<IPlatformRenderInterface>();

6
src/Avalonia.Visuals/Platform/IPlatformRenderInterface.cs

@ -106,7 +106,7 @@ namespace Avalonia.Platform
/// <param name="stream">The stream to read the bitmap from.</param>
/// <param name="width">The desired width of the resulting bitmap.</param>
/// <param name="interpolationMode">The <see cref="BitmapInterpolationMode"/> to use should resizing be required.</param>
/// <returns>An <see cref="IBitmapImpl"/>.</returns>
/// <returns>An <see cref="IWriteableBitmapImpl"/>.</returns>
IWriteableBitmapImpl LoadWriteableBitmapToWidth(Stream stream, int width, BitmapInterpolationMode interpolationMode = BitmapInterpolationMode.HighQuality);
/// <summary>
@ -119,14 +119,14 @@ namespace Avalonia.Platform
IWriteableBitmapImpl LoadWriteableBitmapToHeight(Stream stream, int height, BitmapInterpolationMode interpolationMode = BitmapInterpolationMode.HighQuality);
/// <summary>
/// Loads a WriteableBitmap implementation from a file..
/// Loads a WriteableBitmap implementation from a file.
/// </summary>
/// <param name="fileName">The filename of the bitmap.</param>
/// <returns>An <see cref="IBitmapImpl"/>.</returns>
IWriteableBitmapImpl LoadWriteableBitmap(string fileName);
/// <summary>
/// Loads a WriteableBitmap implementation from a file..
/// Loads a WriteableBitmap implementation from a file.
/// </summary>
/// <param name="stream">The stream to read the bitmap from.</param>
/// <returns>An <see cref="IBitmapImpl"/>.</returns>

4
src/Skia/Avalonia.Skia/WriteableBitmapImpl.cs

@ -34,7 +34,7 @@ namespace Avalonia.Skia
}
PixelSize = new PixelSize(_bitmap.Width, _bitmap.Height);
Dpi = new Vector(96, 96);
Dpi = SkiaPlatform.DefaultDpi;
}
}
@ -77,7 +77,7 @@ namespace Avalonia.Skia
_bitmap = bmp;
PixelSize = new PixelSize(bmp.Width, bmp.Height);
Dpi = new Vector(96, 96);
Dpi = SkiaPlatform.DefaultDpi;
}
}

Loading…
Cancel
Save