An experimental cross-platform native graphics library.
Перейти к файлу
dotnet-maestro[bot] a4c707a560
[main] Update dependencies from xamarin/xamarin-macios (#389)
* Update dependencies from https://github.com/xamarin/xamarin-macios build 20220407.41

Microsoft.tvOS.Sdk , Microsoft.macOS.Sdk , Microsoft.MacCatalyst.Sdk , Microsoft.iOS.Sdk
 From Version 15.4.200-rc.2.144 -> To Version 15.4.200-rc.2.149

* Update dependencies from https://github.com/xamarin/xamarin-macios build 20220408.4

Microsoft.tvOS.Sdk , Microsoft.macOS.Sdk , Microsoft.MacCatalyst.Sdk , Microsoft.iOS.Sdk
 From Version 15.4.200-rc.2.144 -> To Version 15.4.200-rc.2.151

* Use the correct version band

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
2022-04-09 02:41:43 +02:00
.config
.github/workflows
build Update the Windows Dependencies (#384) 2022-04-06 21:34:21 +02:00
eng [main] Update dependencies from xamarin/xamarin-macios (#389) 2022-04-09 02:41:43 +02:00
samples Update the Windows Dependencies (#384) 2022-04-06 21:34:21 +02:00
src Update the Windows Dependencies (#384) 2022-04-06 21:34:21 +02:00
tests
.editorconfig
.gitattributes
.gitignore
CODE-OF-CONDUCT.md
CONTRIBUTING.md
Directory.Build.props
Directory.Build.targets
GitInfo.txt
LICENSE
Microsoft.Maui.Graphics-net6.sln
Microsoft.Maui.Graphics.Mac-net6.slnf
Microsoft.Maui.Graphics.Mac.sln
Microsoft.Maui.Graphics.sln
Microsoft.Maui.Graphics.sln.DotSettings
NuGet.config Update dependencies from https://github.com/xamarin/xamarin-android build 6.0.3xx-4ffab0b05af4a474ad698de1da0d1af88e22f370-1 2022-04-08 13:16:08 +00:00
README.md
azure-pipelines.yml [main] Update dependencies from xamarin/xamarin-macios (#389) 2022-04-09 02:41:43 +02:00
build.cake
build.cmd
build.ps1
build.sh
global.json

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 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