2015-11-13 18:21:00 +03:00
# SkiaSharp
2015-11-14 07:33:17 +03:00
2016-11-22 04:49:05 +03:00
[![SkiaSharp ](https://img.shields.io/nuget/vpre/SkiaSharp.svg?maxAge=2592000&label=SkiaSharp%20nuget )](https://www.nuget.org/packages/SkiaSharp) [![SkiaSharp.Views ](https://img.shields.io/nuget/vpre/SkiaSharp.Views.svg?maxAge=2592000&label=SkiaSharp.Views%20nuget )](https://www.nuget.org/packages/SkiaSharp.Views) [![SkiaSharp.Views.Forms ](https://img.shields.io/nuget/vpre/SkiaSharp.Views.Forms.svg?maxAge=2592000&label=SkiaSharp.Views.Forms%20nuget )](https://www.nuget.org/packages/SkiaSharp.Views.Forms)
2016-11-22 04:51:38 +03:00
[![Gitter.im ](https://img.shields.io/badge/gitter.im-xamarin%2FXamarinComponents-E60256.svg )](https://gitter.im/xamarin/XamarinComponents) [![Xamarin Forums ](https://img.shields.io/badge/forums-Graphics%20%26%20Games%2FSkiaSharp-1faece.svg )](https://forums.xamarin.com/categories/skiasharp)
2016-11-22 04:49:05 +03:00
[![API Docs ](https://img.shields.io/badge/docs-api-1faece.svg )](https://developer.xamarin.com/api/root/SkiaSharp/) [![API Docs ](https://img.shields.io/badge/docs-guides-1faece.svg )](https://developer.xamarin.com/guides/cross-platform/drawing/)
2016-05-15 00:40:40 +03:00
2016-04-07 18:13:46 +03:00
SkiaSharp is a cross-platform 2D graphics API for .NET platforms based on Google's
2017-03-24 17:29:33 +03:00
Skia Graphics Library (https://skia.org/). It provides a comprehensive 2D API that can
2016-04-07 18:13:46 +03:00
be used across mobile, server and desktop models to render images.
2015-11-14 07:33:17 +03:00
2016-02-23 00:04:36 +03:00
SkiaSharp provides a PCL and platform-specific bindings for:
2015-11-14 07:33:17 +03:00
2017-03-24 17:41:41 +03:00
- .NET Core / .NET Standard 1.3
2016-02-22 19:22:29 +03:00
- Xamarin.Android
- Xamarin.iOS
2016-06-10 00:27:03 +03:00
- Xamarin.tvOS
2016-07-29 20:17:04 +03:00
- Xamarin.Mac
2017-03-24 17:29:33 +03:00
- Windows Classic Desktop (Windows.Forms / WPF)
2017-03-24 17:41:41 +03:00
- Windows UWP (Desktop / Mobile / Xbox / HoloLens)
2016-02-22 19:22:29 +03:00
2017-03-24 17:41:41 +03:00
The [API Documentation ](https://developer.xamarin.com/api/namespace/SkiaSharp/ ) is
available on the web to browse.
2016-02-22 19:22:29 +03:00
2016-02-23 19:48:23 +03:00
## Using SkiaSharp
2016-02-22 19:22:29 +03:00
2016-08-11 06:22:51 +03:00
SkiaSharp is available as a convenience NuGet package, to use install the package like this:
```
nuget install SkiaSharp
```
2017-03-24 17:41:41 +03:00
_Make sure the [Visual C++ Redistributable for Visual Studio 2015 ](https://www.microsoft.com/en-us/download/details.aspx?id=48145 )
is installed if this error occurs on Windows:_
2016-08-15 19:59:42 +03:00
> Unable to load DLL 'libSkiaSharp.dll': The specified module could not be found.
2017-03-24 17:41:41 +03:00
_At this point in time, we do not ship a native Linux binary, but you can build your own using the directions below._
2016-02-23 19:48:23 +03:00
## Building SkiaSharp
2017-03-24 17:29:33 +03:00
Before building SkiaSharp:
* [Python 2.7 ](https://www.python.org/downloads ) is available in the `PATH` environment variable on Windows
* [Android NDK r14 ](https://developer.android.com/ndk/downloads/index.html ) is available in the `ANDROID_NDK_HOME` environment variable on macOS
* [.NET Core ](https://www.microsoft.com/net/core ) is installed on all platforms
First, clone the repository:
2016-04-08 21:58:02 +03:00
$ git clone https://github.com/mono/SkiaSharp.git
Next, set up the submodules:
$ cd SkiaSharp
2017-03-24 17:29:33 +03:00
$ git submodule update --init --recursive
2016-02-23 19:48:23 +03:00
2017-03-24 17:29:33 +03:00
Finally, build everything:
2016-06-28 16:07:00 +03:00
2017-03-24 17:41:41 +03:00
Mac/Linux:
2017-03-24 17:29:33 +03:00
$ ./bootstrapper.sh -t everything
2016-03-01 12:30:33 +03:00
2017-03-24 17:41:41 +03:00
Windows:
2017-03-24 17:29:33 +03:00
> .\bootstrapper.ps1 -Target everything
2016-02-23 19:48:23 +03:00
2017-03-24 17:29:33 +03:00
_If you are updating the source using a previous checkout, make sure to run the `clean` target before building._
2016-02-23 19:48:23 +03:00
2016-10-24 17:28:12 +03:00
## New Skia Features Roadmap
Google has created a [nice doc with a collection of high level items ](https://docs.google.com/document/d/1C9w8qpPpdgNGThqmgNnTToLZ5UYK4TsUGl5X3B_q6oM/edit )
they have on tap the next 6-12 months. Note it is a living document that changes based on the requirements of the library's users.
2016-05-17 17:36:29 +03:00
## Compare Code
Here are some links to show the differences in our code as compared to Google's.
2017-03-20 14:29:42 +03:00
What version are we on? [**m57** ](https://github.com/google/skia/tree/chrome/m57 )
Are we up-to-date with Google? [Compare ](https://github.com/mono/skia/compare/xamarin-mobile-bindings...google:chrome/m57 )
What have we added? [Compare ](https://github.com/google/skia/compare/chrome/m57...mono:xamarin-mobile-bindings )