Home

Awesome

SkiaSharp.Elements

<a href="https://www.nuget.org/packages/SkiaSharp.Elements"><img src="https://img.shields.io/nuget/dt/SkiaSharp.Elements.svg" /></a>

Simple way to draw and interact with elements using the library SkiaSharp. Compatible with Xamarin Forms

Using Elements

Install the NuGet package SkiaSharp.Elements:

nuget install SkiaSharp.Element

Getting Started

Samples

Elements

Drawing Rectangle

var rectangle = new SkiaSharp.Elements.Rectangle(SKRect.Create(20, 20, 100, 100))
{
    FillColor = SKColors.SpringGreen
};
canvas.Elements.Add(rectangle);

Transformation

var rectangle = new SkiaSharp.Elements.Rectangle(SKRect.Create(120, 150, 100, 100))
{
    FillColor = SKColors.SpringGreen
    Transformation = SKMatrix.CreateRotationDegrees(45)
};
canvas.Elements.Add(rectangle);

Animation

new Animation((value) =>
{
    rectangle.Transformation = SKMatrix.CreateRotationDegrees(360 * (float)value);
})
.Commit(this, "Anim", length: 2000, easing: Easing.SpringOut);

Samples

Get sample here