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="width">The desired width of the resulting bitmap.</param>
/// <param name="interpolationMode">The <see cref="BitmapInterpolationMode"/> to use should any scaling be required.</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> /// <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>(); 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="height">The desired height of the resulting bitmap.</param>
/// <param name="interpolationMode">The <see cref="BitmapInterpolationMode"/> to use should any scaling be required.</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> /// <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>(); 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="stream">The stream to read the bitmap from.</param>
/// <param name="width">The desired width of the resulting bitmap.</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> /// <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); IWriteableBitmapImpl LoadWriteableBitmapToWidth(Stream stream, int width, BitmapInterpolationMode interpolationMode = BitmapInterpolationMode.HighQuality);
/// <summary> /// <summary>
@ -119,14 +119,14 @@ namespace Avalonia.Platform
IWriteableBitmapImpl LoadWriteableBitmapToHeight(Stream stream, int height, BitmapInterpolationMode interpolationMode = BitmapInterpolationMode.HighQuality); IWriteableBitmapImpl LoadWriteableBitmapToHeight(Stream stream, int height, BitmapInterpolationMode interpolationMode = BitmapInterpolationMode.HighQuality);
/// <summary> /// <summary>
/// Loads a WriteableBitmap implementation from a file.. /// Loads a WriteableBitmap implementation from a file.
/// </summary> /// </summary>
/// <param name="fileName">The filename of the bitmap.</param> /// <param name="fileName">The filename of the bitmap.</param>
/// <returns>An <see cref="IBitmapImpl"/>.</returns> /// <returns>An <see cref="IBitmapImpl"/>.</returns>
IWriteableBitmapImpl LoadWriteableBitmap(string fileName); IWriteableBitmapImpl LoadWriteableBitmap(string fileName);
/// <summary> /// <summary>
/// Loads a WriteableBitmap implementation from a file.. /// Loads a WriteableBitmap implementation from a file.
/// </summary> /// </summary>
/// <param name="stream">The stream to read the bitmap from.</param> /// <param name="stream">The stream to read the bitmap from.</param>
/// <returns>An <see cref="IBitmapImpl"/>.</returns> /// <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); PixelSize = new PixelSize(_bitmap.Width, _bitmap.Height);
Dpi = new Vector(96, 96); Dpi = SkiaPlatform.DefaultDpi;
} }
} }
@ -77,7 +77,7 @@ namespace Avalonia.Skia
_bitmap = bmp; _bitmap = bmp;
PixelSize = new PixelSize(bmp.Width, bmp.Height); PixelSize = new PixelSize(bmp.Width, bmp.Height);
Dpi = new Vector(96, 96); Dpi = SkiaPlatform.DefaultDpi;
} }
} }

Loading…
Cancel
Save