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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
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>
|
|
|
|
|