This commit is contained in:
Matthew Leibowitz 2017-04-24 16:20:53 +02:00
Родитель 4afcf77ad9
Коммит 1bd916a59a
2 изменённых файлов: 10 добавлений и 2 удалений

2
externals/skia поставляемый

@ -1 +1 @@
Subproject commit f95f135c485305abede487df9a7fd2d0efc0ed20
Subproject commit 799209411ee741b4a2c90bca87de8448e3965285

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

@ -11,6 +11,7 @@ namespace SkiaSharpSample.Samples
public class CreateXpsSample : SampleBase
{
private string root;
private bool xpsSupported = true;
[Preserve]
public CreateXpsSample()
@ -46,7 +47,7 @@ namespace SkiaSharpSample.Samples
paint.StrokeWidth = 3;
paint.TextAlign = SKTextAlign.Center;
canvas.DrawText("tap to open XPS", width / 2f, height / 3, paint);
canvas.DrawText(xpsSupported ? "tap to open XPS" : "Oops! No XPS support!", width / 2f, height / 3, paint);
}
}
@ -60,6 +61,13 @@ namespace SkiaSharpSample.Samples
using (var document = SKDocument.CreateXps(stream))
using (var paint = new SKPaint())
{
if (document == null)
{
xpsSupported = false;
Refresh();
return;
}
paint.TextSize = 64.0f;
paint.IsAntialias = true;
paint.Color = (SKColor)0xFF9CAFB7;