Added ToUIImage overloads that offer pixel scale
This commit is contained in:
Родитель
d1c4ac5656
Коммит
1487463de4
|
@ -1,4 +1,5 @@
|
|||
using UIKit;
|
||||
using System;
|
||||
using UIKit;
|
||||
|
||||
#if __TVOS__
|
||||
namespace SkiaSharp.Views.tvOS
|
||||
|
@ -79,6 +80,12 @@ namespace SkiaSharp.Views.iOS
|
|||
return false;
|
||||
}
|
||||
|
||||
public static UIImage ToUIImage(this SKPicture skiaPicture, SKSizeI dimensions, nfloat scale, UIImageOrientation orientation)
|
||||
{
|
||||
var cgImage = skiaPicture.ToCGImage(dimensions);
|
||||
return new UIImage(cgImage, scale, orientation);
|
||||
}
|
||||
|
||||
public static UIImage ToUIImage(this SKPicture skiaPicture, SKSizeI dimensions)
|
||||
{
|
||||
var cgImage = skiaPicture.ToCGImage(dimensions);
|
||||
|
@ -91,12 +98,24 @@ namespace SkiaSharp.Views.iOS
|
|||
return new UIImage(cgImage);
|
||||
}
|
||||
|
||||
public static UIImage ToUIImage(this SKPixmap skiaPixmap, nfloat scale, UIImageOrientation orientation)
|
||||
{
|
||||
var cgImage = skiaPixmap.ToCGImage();
|
||||
return new UIImage(cgImage, scale, orientation);
|
||||
}
|
||||
|
||||
public static UIImage ToUIImage(this SKPixmap skiaPixmap)
|
||||
{
|
||||
var cgImage = skiaPixmap.ToCGImage();
|
||||
return new UIImage(cgImage);
|
||||
}
|
||||
|
||||
public static UIImage ToUIImage(this SKBitmap skiaBitmap, nfloat scale, UIImageOrientation orientation)
|
||||
{
|
||||
var cgImage = skiaBitmap.ToCGImage();
|
||||
return new UIImage(cgImage, scale, orientation);
|
||||
}
|
||||
|
||||
public static UIImage ToUIImage(this SKBitmap skiaBitmap)
|
||||
{
|
||||
var cgImage = skiaBitmap.ToCGImage();
|
||||
|
|
Загрузка…
Ссылка в новой задаче