зеркало из https://github.com/mono/SkiaSharp.git
Add compatibility overloads for SKFilterQuality (#2963)
This commit is contained in:
Родитель
054d48e7a3
Коммит
e5675c9539
|
@ -766,12 +766,20 @@ namespace SkiaSharp
|
|||
public SKShader ToShader (SKShaderTileMode tmx, SKShaderTileMode tmy, SKSamplingOptions sampling) =>
|
||||
ToShader (tmx, tmy, sampling, null);
|
||||
|
||||
[Obsolete ("Use ToShader(SKShaderTileMode tmx, SKShaderTileMode tmy, SKSamplingOptions sampling) instead.")]
|
||||
public SKShader ToShader (SKShaderTileMode tmx, SKShaderTileMode tmy, SKFilterQuality quality) =>
|
||||
ToShader (tmx, tmy, quality.ToSamplingOptions(), null);
|
||||
|
||||
public SKShader ToShader (SKShaderTileMode tmx, SKShaderTileMode tmy, SKMatrix localMatrix) =>
|
||||
ToShader (tmx, tmy, SKSamplingOptions.Default, &localMatrix);
|
||||
|
||||
public SKShader ToShader (SKShaderTileMode tmx, SKShaderTileMode tmy, SKSamplingOptions sampling, SKMatrix localMatrix) =>
|
||||
ToShader (tmx, tmy, sampling, &localMatrix);
|
||||
|
||||
[Obsolete ("Use ToShader(SKShaderTileMode tmx, SKShaderTileMode tmy, SKSamplingOptions sampling, SKMatrix localMatrix) instead.")]
|
||||
public SKShader ToShader (SKShaderTileMode tmx, SKShaderTileMode tmy, SKFilterQuality quality, SKMatrix localMatrix) =>
|
||||
ToShader (tmx, tmy, quality.ToSamplingOptions(), &localMatrix);
|
||||
|
||||
private SKShader ToShader (SKShaderTileMode tmx, SKShaderTileMode tmy, SKSamplingOptions sampling, SKMatrix* localMatrix) =>
|
||||
SKShader.GetObject (SkiaApi.sk_bitmap_make_shader (Handle, tmx, tmy, &sampling, localMatrix));
|
||||
}
|
||||
|
|
|
@ -409,9 +409,17 @@ namespace SkiaSharp
|
|||
public SKShader ToShader (SKShaderTileMode tileX, SKShaderTileMode tileY, SKSamplingOptions sampling) =>
|
||||
ToShader (tileX, tileY, sampling, null);
|
||||
|
||||
[Obsolete ("Use ToShader(SKShaderTileMode tileX, SKShaderTileMode tileY, SKSamplingOptions sampling) instead.")]
|
||||
public SKShader ToShader (SKShaderTileMode tileX, SKShaderTileMode tileY, SKFilterQuality quality) =>
|
||||
ToShader (tileX, tileY, quality.ToSamplingOptions(), null);
|
||||
|
||||
public SKShader ToShader (SKShaderTileMode tileX, SKShaderTileMode tileY, SKSamplingOptions sampling, SKMatrix localMatrix) =>
|
||||
ToShader (tileX, tileY, sampling, &localMatrix);
|
||||
|
||||
[Obsolete ("Use ToShader(SKShaderTileMode tileX, SKShaderTileMode tileY, SKSamplingOptions sampling, SKMatrix localMatrix) instead.")]
|
||||
public SKShader ToShader (SKShaderTileMode tileX, SKShaderTileMode tileY, SKFilterQuality quality, SKMatrix localMatrix) =>
|
||||
ToShader (tileX, tileY, quality.ToSamplingOptions(), &localMatrix);
|
||||
|
||||
private SKShader ToShader (SKShaderTileMode tileX, SKShaderTileMode tileY, SKSamplingOptions sampling, SKMatrix* localMatrix) =>
|
||||
SKShader.GetObject (SkiaApi.sk_image_make_shader (Handle, tileX, tileY, &sampling, localMatrix));
|
||||
|
||||
|
|
|
@ -80,12 +80,20 @@ namespace SkiaSharp
|
|||
public static SKShader CreateImage (SKImage src, SKShaderTileMode tmx, SKShaderTileMode tmy, SKSamplingOptions sampling) =>
|
||||
src?.ToShader (tmx, tmy, sampling) ?? throw new ArgumentNullException (nameof (src));
|
||||
|
||||
[Obsolete ("Use CreateImage(SKImage src, SKShaderTileMode tmx, SKShaderTileMode tmy, SKSamplingOptions sampling) instead.")]
|
||||
public static SKShader CreateImage (SKImage src, SKShaderTileMode tmx, SKShaderTileMode tmy, SKFilterQuality quality) =>
|
||||
src?.ToShader (tmx, tmy, quality.ToSamplingOptions()) ?? throw new ArgumentNullException (nameof (src));
|
||||
|
||||
public static SKShader CreateImage (SKImage src, SKShaderTileMode tmx, SKShaderTileMode tmy, SKMatrix localMatrix) =>
|
||||
src?.ToShader (tmx, tmy, localMatrix) ?? throw new ArgumentNullException (nameof (src));
|
||||
|
||||
public static SKShader CreateImage (SKImage src, SKShaderTileMode tmx, SKShaderTileMode tmy, SKSamplingOptions sampling, SKMatrix localMatrix) =>
|
||||
src?.ToShader (tmx, tmy, sampling, localMatrix) ?? throw new ArgumentNullException (nameof (src));
|
||||
|
||||
[Obsolete ("Use CreateImage(SKImage src, SKShaderTileMode tmx, SKShaderTileMode tmy, SKSamplingOptions sampling, SKMatrix localMatrix) instead.")]
|
||||
public static SKShader CreateImage (SKImage src, SKShaderTileMode tmx, SKShaderTileMode tmy, SKFilterQuality quality, SKMatrix localMatrix) =>
|
||||
src?.ToShader (tmx, tmy, quality.ToSamplingOptions(), localMatrix) ?? throw new ArgumentNullException (nameof (src));
|
||||
|
||||
// CreatePicture
|
||||
|
||||
public static SKShader CreatePicture (SKPicture src) =>
|
||||
|
|
Загрузка…
Ссылка в новой задаче