Ссылка на комментарий в данный момент отключена. Из-за того, что папка «образцы» может снова изменить путь в будущем, любой, кто нуждается, может начать исследовать с страницы https://github.com/mono/SkiaSharp.
Более подробную информацию об использовании SkiaSharp можно найти на API documentation online и в этой статье о вовлечении с skia sharp
для тех, кто нуждается в практической быстрый старт о том, как использовать его здесь несколько примеров:
Получение SKCanvas
using (var surface = SKSurface.Create (width: 640, height: 480, SKColorType.N_32, SKAlphaType.Premul)) {
SKCanvas myCanvas = surface.Canvas;
// Your drawing code goes here.
}
Рисование текста
// clear the canvas/fill with white
canvas.DrawColor (SKColors.White);
// set up drawing tools
using (var paint = new SKPaint()) {
paint.TextSize = 64.0f;
paint.IsAntialias = true;
paint.Color = new SKColor (0x42, 0x81, 0xA4);
paint.IsStroke = false;
// draw the text
canvas.DrawText ("Skia", 0.0f, 64.0f, paint);
}
Drawing Bitmaps
Stream fileStream = File.OpenRead ("MyImage.png");
// clear the canvas/fill with white
canvas.DrawColor (SKColors.White);
// decode the bitmap from the stream
using (var stream = new SKManagedStream(fileStream))
using (var bitmap = SKBitmap.Decode(stream))
using (var paint = new SKPaint()) {
canvas.DrawBitmap(bitmap, SKRect.Create(Width, Height), paint);
}
Рисование с помощью графических фильтров
Stream fileStream = File.OpenRead ("MyImage.png"); // open a stream to an image file
// clear the canvas/fill with white
canvas.DrawColor (SKColors.White);
// decode the bitmap from the stream
using (var stream = new SKManagedStream(fileStream))
using (var bitmap = SKBitmap.Decode(stream))
using (var paint = new SKPaint()) {
// create the image filter
using (var filter = SKImageFilter.CreateBlur(5, 5)) {
paint.ImageFilter = filter;
// draw the bitmap through the filter
canvas.DrawBitmap(bitmap, SKRect.Create(width, height), paint);
}
}
Как получилось downvote, объясните, пожалуйста, так что я могу изменить свой вопрос –
я после Руководство по началу работы который не включал интеграцию окон. Спасибо за указание на образцы :-) –