зеркало из https://github.com/mono/SkiaSharp.git
Fix the samples with the new APIs
This commit is contained in:
Родитель
8dc9af4255
Коммит
f26e212599
|
@ -27,7 +27,6 @@ namespace SkiaSharpSample.Samples
|
|||
using (var tf = SKTypeface.FromFamilyName("Arial"))
|
||||
{
|
||||
var info = codec.Info;
|
||||
var encodedInfo = codec.EncodedInfo;
|
||||
|
||||
paint.IsAntialias = true;
|
||||
paint.TextSize = 14;
|
||||
|
@ -57,7 +56,7 @@ namespace SkiaSharpSample.Samples
|
|||
canvas.DrawText(string.Format("Pixels: {0} @ {1}b/px", bitmap.Pixels.Length, bitmap.BytesPerPixel), x, y, paint);
|
||||
y += 20;
|
||||
|
||||
canvas.DrawText(string.Format("Encoding: {0} ({1}) @ {2}-bit color", encodedInfo.Color, encodedInfo.Alpha, encodedInfo.BitsPerComponent), x, y, paint);
|
||||
canvas.DrawText(string.Format("Encoding: {0} ({1}) @ {2}-bit color", info.ColorType, info.AlphaType, info.BitsPerPixel), x, y, paint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ namespace SkiaSharpSample.Samples
|
|||
{
|
||||
canvas.Clear(SKColors.Black);
|
||||
|
||||
var opts = new SKCodecOptions(currentFrame, false);
|
||||
var opts = new SKCodecOptions(currentFrame);
|
||||
if (codec?.GetPixels(info, bitmap.GetPixels(), opts) == SKCodecResult.Success)
|
||||
{
|
||||
bitmap.NotifyPixelsChanged();
|
||||
|
|
Загрузка…
Ссылка в новой задаче