Live Skia editor with Xamarin Forms using Gtk+ backend.
Clone this repository. Open the solution in FormsGtkLive.sln with Visual Studio for Mac, update NuGet packages and run FormsGtkLive.
Disclaimer This project has only be tested in a MacOS operating system with Visual Studio for Mac.
In the editor, write the Skia# code as if you were writting a function with a SKCanvas canvas parameter.
// clear the canvas / fill with red
canvas.Clear (SKColors.Red);
You can also directly copy and paste any of the examples in Xamarin's Skia introduction .
Internally, the code in the editor is evaluated into an Action like:
var codeToEval = $"new Action<SKCanvas>((SKCanvas canvas) => {{ {code} }});";
This action will be executed in the SKWidget's PaintSurface callback.
Compiler errors will be reported in red at the bottom of the main window.
This project was created for fun, it's not ready for production and I don't plan to maintain it. You are free to fork it and change for your own needs :)
Code released under the MIT license.
This project uses GtkFormsLive from @jsuarezruiz for the Xamarin Forms UI and Continous from @praeclarum for the C# evaluator.