Browse Source

Merge pull request #2120 from Gillibald/fixes/2119

Makes sure a surface is not created with a width or height of zero
pull/2182/head
Steven Kirk 7 years ago
committed by GitHub
parent
commit
14b51d4761
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/Skia/Avalonia.Skia/SurfaceRenderTarget.cs

2
src/Skia/Avalonia.Skia/SurfaceRenderTarget.cs

@ -137,7 +137,7 @@ namespace Avalonia.Skia
{
var colorType = PixelFormatHelper.ResolveColorType(format);
return new SKImageInfo(width, height, colorType, SKAlphaType.Premul);
return new SKImageInfo(Math.Max(width, 1), Math.Max(height, 1), colorType, SKAlphaType.Premul);
}
/// <summary>

Loading…
Cancel
Save