SkiaSharp Documentation

SkiaSharp is a cross-platform 2D graphics API for .NET platforms based on Google's Skia Graphics Library. It provides a comprehensive 2D API that can be...

RAW Doc

1. Project Overview & Quickstart (mono/SkiaSharp)

SkiaSharp







SkiaSharp is a cross-platform 2D graphics API for .NET platforms based on Google's
Skia Graphics Library (skia.org). It provides a comprehensive 2D API that can
be used across mobile, server and desktop models to render images.

SkiaSharp provides cross-platform bindings for:

  • .NET Standard 2.0
  • .NET Framework 4.6.2+ (Recommended .NET Framework 4.8)
  • .NET Core
  • .NET 6+
  • Tizen
  • Android
  • iOS
  • tvOS
  • macOS
  • Mac Catalyst
  • WinUI 3 (Windows App SDK / Uno Platform)
  • Windows Classic Desktop (Windows.Forms / WPF)
  • Web Assembly (WASM)
  • Uno Platform (iOS / Android / Windows / macOS / Linux / WebAssembly)

The API Documentation is
available on the web to browse.

Using SkiaSharp

SkiaSharp is available as a convenient NuGet package, to use install the package like this:

text
nuget install SkiaSharp

Because there are multiple distros of Linux, and we cannot possibly support them all, we have a separate NuGet package that will contain the supported binaries for a few distros: SkiaSharp.NativeAssets.Linux. (distros) (more info)

There is also a early access feed that you can use to get the latest and greatest, before it goes out to the public:

text
https://aka.ms/skiasharp-eap/index.json

Building SkiaSharp

Building SkiaSharp is mostly straight forward. The main issue is the multiple dependencies for each platform.

However, these are easy to install as they are found on the various websites. If you are just working on managed code, it is even easier as there are ways to skip all the native builds.

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines on:

  • Reporting issues
  • Submitting pull requests
  • Building from source
  • Adding new APIs

For comprehensive documentation:

Contributors

Made with contrib.rocks.

2. Official Technical Reference & Guides (mono/website)

File: README.md

Mono Project Website

This repository contains the files used for generating the Mono website.

The site uses Jekyll, a static site generator. GitHub Pages, where the site is hosted, natively supports Jekyll so every time someone pushes to this repository, the website will be built and updated. For hosting it yourself, see Setting up a local copy of the website.

Contributing to the website

Note: Major issues or feature requests should be filed on the issue tracker first, so we can discuss the implications.

If you want to edit a page, the easiest way is to click the link under the page title on the website.

This will open the source file on GitHub where you can click the pencil button to start editing:

GitHub's editor shows you both the Markdown source as well as a preview of the rendered page:

After you've finished your changes, enter a proper summary and description and click the "Propose file change" button to open a pull request:

Setting up a local copy of the website

For larger changes, using the web-based editor on GitHub is not really convenient. A better way is to setup a local copy of the website where you can experiment.

Dependencies

  • Ruby - Jekyll is written in Ruby
  • Bundler - a package manager for Ruby. Install it by running gem install bundler

After you've forked and cloned the repository, run the following commands:

  1. bundle install - downloads the required libraries
  2. bundle exec jekyll serve - builds the website and runs a local webserver on port 4000

Note: you can add the --watch option when running jekyll serve to let Jekyll watch for file changes, which means the site will be rebuilt when a file is modified.

Note 2: on case-insensitive file systems like on Windows and macOS you'll run into redirect loops for some URLs. The workaround is to disable redirects locally by removing the plugins: jekyll-redirect-from entry from _config.yml.

The site should now be running locally:

Repository structure

  • _includes - special folder contains snippets that can be included via {% include file.html %} in other pages
  • _layouts - special folder contains the layouts that are shared between pages. Layouts can be inherited, the root layout is base.html.
  • _posts - special folder, contains the source pages for the blog section, see Writing a blog post
  • _site - the output of the generated site is stored here by default, this folder only exists after Jekyll built the site
  • archived - content that is no longer relevant but kept to keep external links working
  • community - contains the source pages for the /community website section
  • css - contains the main stylesheet
  • docs - contains the source pages for the /docs website section
  • download - contains the source pages for the /download website section
  • files - stores binary files used in pages
  • images - stores the images used in pages
  • news - lists the blog pages from the _posts directory

Writing a blog post

Blogging is very easy with Jekyll. Browse to _posts directory, copy the Markdown file _TEMPLATE.md and rename that file following the file name convention: YEAR-MONTH-DAY-title.md. Then open the file you renamed and follow the steps there to complete writing a blog post.

Make sure to not include special characters in the file name. The blog entry's publishing date is automatically extracted from the file name.


File: docs/index.md


title: Documentation
redirect_from:

  • /Documentation/
  • /Class_Library_Documentation/
  • /Docs/

{% capture docNote %}
The Mono Project (mono/mono) (β€˜original mono’) has been an important part of the .NET ecosystem since it was launched in 2001. Microsoft became the steward of the Mono Project when it acquired Xamarin in 2016.

The last major release of the Mono Project was in July 2019, with minor patch releases since that time. The last patch release was February 2024.

We are happy to announce that the WineHQ organization will be taking over as the stewards of the Mono Project upstream at wine-mono / Mono Β· GitLab (winehq.org). Source code in existing mono/mono and other repos will remain available, although repos may be archived. Binaries will remain available for up to four years.

Microsoft maintains a modern fork of Mono runtime in the dotnet/runtime repo and has been progressively moving workloads to that fork. That work is now complete, and we recommend that active Mono users and maintainers of Mono-based app frameworks migrate to .NET which includes work from this fork.

We want to recognize that the Mono Project was the first .NET implementation on Android, iOS, Linux, and other operating systems. The Mono Project was a trailblazer for the .NET platform across many operating systems. It helped make cross-platform .NET a reality and enabled .NET in many new places and we appreciate the work of those who came before us.

Thank you to all the Mono developers!
{% endcapture %}

These docs cover Mono specific topics, like setting up and configuring Mono or information about Mono internals such as the runtime, garbage collector or various Mono-specific tools.

For general information about the .NET framework and the class libraries you can refer to Microsoft's MSDN pages.

{% capture docNote %}
Our website is open source on GitHub. If you find errors or think a page could be improved, just click the "Edit page on GitHub" link beneath the page title. See contributing to the website for more details.
{% endcapture %}
{% include note.html type='info' message=docNote %}

[Getting Started](/docs/getting-started)

[About Mono](/docs/about-mono/)

Showcases

[Compiling Mono](/docs/compiling-mono/)

[FAQ](/docs/faq/general/)

[Database Access](/docs/database-access/)

[Debugging](/docs/debug+profile/debug/)

[Profiling](/docs/debug+profile/profile/)

[Clang Sanitizers](/docs/debug+profile/clang/)

GUI

Web

[Tools](/docs/tools+libraries/tools/)

[Libraries](/docs/tools+libraries/libraries/)

Advanced Topics

[Runtime](/docs/advanced/runtime/)