Added EncodedInfo to the sample

This commit is contained in:
Matthew Leibowitz 2016-11-25 10:56:23 +02:00
Родитель 0ef9633267
Коммит 7d5e4286f0
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -27,6 +27,7 @@ namespace SkiaSharpSample.Samples
using (var tf = SKTypeface.FromFamilyName("Arial"))
{
var info = codec.Info;
var encodedInfo = codec.EncodedInfo;
paint.IsAntialias = true;
paint.TextSize = 14;
@ -54,6 +55,9 @@ namespace SkiaSharpSample.Samples
y += 20;
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}b/px", encodedInfo.Color, encodedInfo.Alpha, encodedInfo.BytesPerPixel), x, y, paint);
}
}
}