Cross-platform library for rendering vector graphics and writing graphics-rich apps. Supports iOS, OS X, Android, Windows Phone, Windows RT, WPF among a variety of file formats.
Get Started
| Product | Versions |
|---|---|
| .NET | |
| .NET Standard |
README
CrossGraphics
CrossGraphics aims to deliver a simple immediate mode interface for drawing graphics on a variety of platforms running .NET.
Currently the following platforms are supported:
- iOS and macOS using CoreGraphicsGraphics.cs
- Android using AndroidGraphics.cs
- Cross-platform SkiaSharp using SkiaSharpGraphics.cs
- Cross-platform SVG using SvgGraphics.cs
Installation
dotnet add package CrossGraphics
Using the library
The interface CrossGraphics.IGraphics is the recipient of all drawing commands.
You should now code your objects to be able to draw themselves by being passed and IGraphics object.
Drawing commands include:
- Rectangles using
FillRectandDrawRect - Rounded Rectangles using
FillRoundedRectandDrawRoundedRect - Ovals using
FillOvalandDrawOval - Lines using
DrawLineand the optionBeginLineandEndLineprimitives - Images using
DrawImage - Text using
DrawStringand the associated font functions
Development
- Run Acceptance Tests
dotnet run --project atests/CrossGraphicsAcceptanceTests.csproj -- $(pwd)
License
The code is copyright Frank A. Krueger and is released under the MIT license.
Downloads by Version
Similar & Alternative Packages
Hand-picked matching NuGet libraries based on tags & ecosystem
Depended On By
Find packages that declare this package as a dependency. NuGet does not provide a reverse-dependency endpoint, so candidates are checked on demand.
Adoption Assessment
Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.