This commit is contained in:
jonlipsky 2021-01-04 15:28:31 -08:00 коммит произвёл GitHub
Родитель cb59bd063a
Коммит d210b3df48
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 23 добавлений и 10 удалений

Просмотреть файл

@ -4,33 +4,46 @@ System.Graphics is a cross-platform graphics library for iOS, Android, Windows,
# Motivation # Motivation
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. 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.
# Goals # Goals
* No dependencies on System.Drawing * No dependencies on System.Drawing
* Support all graphics operations within an abstraction that the underlying abstraction supports. * Support all graphics operations within an abstraction that the underlying abstraction supports.
# Status # 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 be broken, and or still include unreachable/non-applicable code that was part of that application. 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.
# Support Platforms
Platform | Supported Abstractions | Platform | Supported Abstractions |
-----------------------|-------------------------------------------| -----------------------|-------------------------------------------|
Xamarin.iOS | CoreGraphics & SkiaSharp | Xamarin.iOS | CoreGraphics & SkiaSharp |
Xamarin.Android | Android.Graphics & SkiaSharp | Xamarin.Android | Android.Graphics & SkiaSharp |
Xamarin.Mac | CoreGraphics & SkiaSharp | Xamarin.Mac | CoreGraphics & SkiaSharp |
WPF | SharpDX, SkiaSharp & GDI | WPF | SharpDX, SkiaSharp, Xaml & GDI |
UWP | SharpDX, Win2D, SkiaSharp | UWP | SharpDX, Win2D, Xaml, SkiaSharp |
WinForms | SharpDX, SkiaSharp & GDI | WinForms | SharpDX, SkiaSharp & GDI |
Linux | SkiaSharp | Linux | SkiaSharp |
Xamarin.Forms | Dependent on native platform support (noted above) | Xamarin.Forms | Dependent on native platform support (noted above) |
# Main Abstractions # Main Abstractions
* Canvas - You can draw to a any of the supported abstractions with a common drawing canvas API * 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
* Images - You can manage, load and create images with a common API * Rectangle, Point and Color primitives
* Fonts - You can access platform font information with a * 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 * Attributed text - You can draw attributed text with a common API
* PDF - You can create PDF's using the canvas abstraction in a cross-platform manner. * 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 # Known Limitations
* Attributed text is not currently supported with SkiaSharp. * 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. * The included Blazor (Canvas) implementation no longer compiles, but is included as a reminder to get it working again