SkiaSharp.Elements Save

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

Project README

SkiaSharp.Elements

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

  • Rectangle
  • Ellipse
  • Image
  • Text
  • Polygon
  • Line
  • Group

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

Open Source Agenda is not affiliated with "SkiaSharp.Elements" Project. README Source: FelipeNicoletto/SkiaSharp.Elements

Open Source Agenda Badge

Open Source Agenda Rating