System.Graphics/README.md

50 строки
2.6 KiB
Markdown
Исходник Обычный вид История

2021-01-05 01:55:34 +03:00
# System.Graphics
2021-01-05 02:13:58 +03:00
System.Graphics is a cross-platform graphics library for iOS, Android, Windows, macOS 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.
# Motivation
2021-01-05 02:28:31 +03:00
Within the dotnet ecosystem there are multiple graphics libraries available depending on your target platforms; however, if you are doing cross-platform development there is not a unified graphics abstraction. Some legacy API's (System.Drawing, I'm looking at you) only have limited support/usefulness on non-Windows platforms. SkiaSharp runs almost everywhere these days, but for many use cases the native graphics abstractions are needed.
2021-01-05 02:13:58 +03:00
# Goals
* No dependencies on System.Drawing
* Support all graphics operations within an abstraction that the underlying abstraction supports.
# Status
2021-01-05 02:28:31 +03:00
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.
2021-01-05 01:55:34 +03:00
2021-01-05 02:28:31 +03:00
# Disclaimer
There is no official support. Use at your own Risk.
# Support Platforms
2021-01-05 01:55:34 +03:00
Platform | Supported Abstractions |
-----------------------|-------------------------------------------|
2021-01-05 02:13:58 +03:00
Xamarin.iOS | CoreGraphics & SkiaSharp |
2021-01-05 01:55:34 +03:00
Xamarin.Android | Android.Graphics & SkiaSharp |
Xamarin.Mac | CoreGraphics & SkiaSharp |
2021-01-05 02:28:31 +03:00
WPF | SharpDX, SkiaSharp, Xaml & GDI |
UWP | SharpDX, Win2D, Xaml, SkiaSharp |
2021-01-05 01:55:34 +03:00
WinForms | SharpDX, SkiaSharp & GDI |
Linux | SkiaSharp |
Xamarin.Forms | Dependent on native platform support (noted above) |
2021-01-05 02:13:58 +03:00
# Main Abstractions
2021-01-05 02:28:31 +03:00
* 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
2021-01-05 01:55:34 +03:00
* Attributed text - You can draw attributed text with a common API
2021-01-05 02:28:31 +03:00
* Bitmaps - You can create and draw on bitmap images with a common API
* PDF - You can create PDF's using a common API
2021-01-05 02:13:58 +03:00
# Known Limitations
2021-01-05 02:28:31 +03:00
* 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