An experimental cross-platform native graphics library.
Перейти к файлу
Matthew Leibowitz 015c4cd2d4 Use the SkiaSharp version on nuget.org 2022-09-08 22:13:31 +02:00
.config
.github/workflows
build Depend on the correct version of SkiaSharp 2022-09-01 15:54:15 +02:00
eng [Tizen] Add NUI-based SkiaGraphicsView for net6 (#486) 2022-09-01 14:03:52 +02:00
samples [Tizen] Add NUI-based SkiaGraphicsView for net6 (#486) 2022-09-01 14:03:52 +02:00
src [Tizen] Add NUI-based SkiaGraphicsView for net6 (#486) 2022-09-01 14:03:52 +02:00
tests Add ParseLightGoldenrodYellowWithSpace benchmark 2022-03-10 17:23:25 -06:00
.editorconfig
.gitattributes
.gitignore
CODE-OF-CONDUCT.md
CONTRIBUTING.md
Directory.Build.props Try update install workloads 2022-03-23 17:41:54 +00:00
Directory.Build.targets
GitInfo.txt Stable version now 2022-09-01 16:54:55 +02:00
LICENSE
Microsoft.Maui.Graphics-net6.sln Add Microsoft.Maui.Graphics.Benchmarks 2022-03-09 20:58:25 -06:00
Microsoft.Maui.Graphics.Mac-net6.slnf Net6 portable sample tester 2021-11-25 15:27:01 -05:00
Microsoft.Maui.Graphics.Mac.sln
Microsoft.Maui.Graphics.sln more fixes 2022-01-14 01:44:15 +02:00
Microsoft.Maui.Graphics.sln.DotSettings
NuGet.config Use the SkiaSharp version on nuget.org 2022-09-08 22:13:31 +02:00
README.md Update README.md 2022-07-26 16:01:28 -05:00
azure-pipelines.yml [Tizen] Remove specifying Tizen sdk version 2022-05-04 12:07:47 +09:00
build.cake Update again 2022-03-24 12:26:19 +00:00
build.cmd Try update install workloads 2022-03-23 17:41:54 +00:00
build.ps1 Try update install workloads 2022-03-23 17:41:54 +00:00
build.sh Try update install workloads 2022-03-23 17:41:54 +00:00
global.json

README.md

Microsoft.Maui.Graphics (Experiment)

NuGet

Microsoft.Maui.Graphics is an experimental cross-platform graphics library for iOS, Android, Windows, macOS, Tizen and Linux written completely in C#. A Microsoft supported portion of this library has been merged with dotnet/maui and is maintained separately. This project remains separate for developers to experiment further on additional scenarios such as WASM, WinForms, WPF, Xamarin, and Linux.

With this library you can use a common API to target multiple abstractions allowing you to share your drawing code between platforms, or mix and match graphics implementations within a singular application.

Goals

  • No dependencies on System.Drawing
  • Support all graphics operations within an abstraction that the underlying abstraction supports.

Status

This is an experimental library; however it's based on code that's been in use in production applications for over 10 years. Because it was refactored out of another code base, some things may have been broken in that process.

Disclaimer

There is no official support. Use at your own Risk.

Supported Platforms

Platform Supported Abstractions
Xamarin.iOS CoreGraphics & SkiaSharp
Xamarin.Android Android.Graphics & SkiaSharp
Xamarin.Mac CoreGraphics & SkiaSharp
WPF SharpDX, SkiaSharp, Xaml & GDI
UWP SharpDX, Win2D, Xaml, SkiaSharp
WinForms SharpDX, SkiaSharp & GDI
Tizen SkiaSharp
Linux SkiaSharp
Xamarin.Forms Dependent on native platform support (noted above)

Main Abstractions

  • Canvas - You can draw to a any of the supported abstractions with a common drawing canvas API and a support of common operations and primitives
    • Rectangle, Point and Color primitives
    • Shapes (Rectangles, Rounded Rectangles, Ellipses, Arcs)
    • Paths
    • Images
    • Fonts
    • Shadows
    • Image and pattern fills
    • Clipping
    • etc...
  • Fonts - You can access fonts with a common API
  • Attributed text - You can draw attributed text with a common API
  • Bitmaps - You can create and draw on bitmap images with a common API
  • PDF - You can create PDFs using a common API

Known Limitations

  • Attributed text is not currently supported with SkiaSharp
  • The included Blazor (Canvas) implementation no longer compiles, but is included as a reminder to get it working again