An experimental cross-platform native graphics library.
Перейти к файлу
dotnet-maestro[bot] 0636249f41 Update dependencies from https://github.com/xamarin/xamarin-android build main-76d9225022f450cde67fdf99012871236f8af67d-1
Microsoft.Android.Sdk.Windows
 From Version 31.0.100-rc.1.12 -> To Version 31.0.100-rc.2.31

Dependency coherency updates

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rc.1.21426.23 -> To Version 6.0.100-rc.2.21456.2 (parent: Microsoft.Android.Sdk.Windows
2021-09-11 12:17:30 +00:00
.config [release/6.0.1xx-rc1] Update dependencies from xamarin/xamarin-android (#157) 2021-08-31 00:38:20 +02:00
.github/workflows Format more of the files with POSIX compliance 2021-04-20 19:48:08 -04:00
build Update Microsoft.Graphics.Win2D (#162) 2021-09-01 19:07:24 +02:00
eng Update dependencies from https://github.com/xamarin/xamarin-android build main-76d9225022f450cde67fdf99012871236f8af67d-1 2021-09-11 12:17:30 +00:00
samples Update Microsoft.Graphics.Win2D (#162) 2021-09-01 19:07:24 +02:00
src Update Microsoft.Graphics.Win2D (#162) 2021-09-01 19:07:24 +02:00
tests/Microsoft.Maui.Graphics.Tests Remove default check on converters 2021-08-03 10:38:45 -05:00
.editorconfig Format more of the files with POSIX compliance 2021-04-20 19:48:08 -04:00
.gitattributes Format C# files for POSIX compliance 2021-04-20 16:48:32 -04:00
.gitignore More fixes 2021-05-27 09:55:53 +01:00
CODE-OF-CONDUCT.md Adding code of conduct 2021-02-08 10:51:46 -08:00
Directory.Build.props DisableImplicitNamespaceImports 2021-08-03 19:29:31 +02:00
Directory.Build.targets Update and build SkiaSharp bits 2021-07-09 15:30:57 +02:00
GitInfo.txt Update GitInfo.txt 2021-08-11 16:20:40 -04:00
LICENSE Initial commit 2020-10-27 13:14:16 -07:00
Microsoft.Maui.Graphics-net6.sln Add tests project to sln 2021-07-15 15:04:41 -04:00
Microsoft.Maui.Graphics.Mac.sln Initial pass at rename 2021-03-11 11:12:48 -09:00
Microsoft.Maui.Graphics.sln Merge branch 'main' into lytico/pullrequests/Gtk.Initial.1 2021-05-14 07:49:39 -07:00
Microsoft.Maui.Graphics.sln.DotSettings Initial pass at rename 2021-03-11 11:12:48 -09:00
NuGet.config no more preview feeds 2021-07-12 23:23:39 +02:00
README.md Fix NuGet link 2021-08-05 11:00:00 +03:00
azure-pipelines.yml Update azure-pipelines.yml (#159) 2021-08-31 00:38:08 +02:00
build.cake Missing methods 2021-05-26 19:24:03 +01:00
global.json Update dependencies from https://github.com/xamarin/xamarin-android build 6.0.1xx-preview5-c527d1e1a177459420452be2e49d1cb1cd94e033-1 2021-05-31 16:48:48 +00:00

README.md

Microsoft.Maui.Graphics

NuGet

Microsoft.Maui.Graphics is a cross-platform graphics library for iOS, Android, Windows, macOS, Tizen and Linux completely in C#. 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 implentations within a singular application.

Applications

Any dotnet projects needing a multi-platform graphics abstraction that is backed by native APIs can use Microsoft.Maui.Graphics.

.NET MAUI is an example of a project using Microsoft.Maui.Graphics.

Note: Microsoft.Maui.Graphics does not have a MAUI dependency and can be used on any of the supported platforms listed below.

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 PDF's 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