зеркало из https://github.com/mono/SkiaSharp.git
Added EncodedInfo to the sample
This commit is contained in:
Родитель
0ef9633267
Коммит
7d5e4286f0
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче