Eto.SkiaDraw

April 9, 2022 ยท View on GitHub

Build NuGet License

Provides an Eto.Forms view control that allows using SkiaSharp functionality for drawing and let Eto do the rendering.

Demo applications : https://nightly.link/rafntor/Eto.SkiaDraw/workflows/build/master

Quickstart

Use NuGet to install Eto.SkiaDraw, then subclass a Eto.SkiaDraw.SkiaDrawable and override the OnPaint event like in the following example:

class TestView : SkiaDrawable
{
   protected override void OnPaint(SKPaintEventArgs e)
   {
      SKColor [] colors = { SKColors.DeepPink, SKColors.DeepSkyBlue };

      for (int i = 0; i < 5; ++i)
         e.Surface.Canvas.DrawOval(Width/2, Height/2, Width/(2+i), Height/(2+i), new SKPaint() { Color = colors[i % 2], IsAntialias = true });
   }
}