SharpCairo 1.15.6-alpha
See the version list below for details.
dotnet add package SharpCairo --version 1.15.6-alpha
NuGet\Install-Package SharpCairo -Version 1.15.6-alpha
<PackageReference Include="SharpCairo" Version="1.15.6-alpha" />
paket add SharpCairo --version 1.15.6-alpha
#r "nuget: SharpCairo, 1.15.6-alpha"
// Install SharpCairo as a Cake Addin #addin nuget:?package=SharpCairo&version=1.15.6-alpha&prerelease // Install SharpCairo as a Cake Tool #tool nuget:?package=SharpCairo&version=1.15.6-alpha&prerelease
CairoSharp
A C# wrapper (.net standard 1.6, and .net 4.5) of cairo. All its dependcies included.
Cairo is a 2D graphics library with support for multiple output devices.
Cairo is designed to produce consistent output on all output media while taking advantage of display hardware acceleration when available. The cairo API provides operations similar to the drawing operators of PostScript and PDF. Operations in cairo including stroking and filling cubic Bézier splines, transforming and compositing translucent images, and antialiased text rendering. All drawing operations can be transformed by any affine transformation (scale, rotation, shear, etc.).
Platforms
A former release works on Windows desktop (Winform/WPF/Console Application) on .NET 4.5 and linux (tested on Ubuntu 12.04) on mono 4.2. CairoSharp was ported to .NET Core (.NET Standard 1.6) after that release.
Supported platforms:
- windows 32bit / 64bit
- linux 64bit (tested on Ubuntu 16.04-server)
Other platforms that support .net core may work, but have not been tested.
On Linux libcairo is a prerequisite. sudo apt-get update && sudo apt-get install -y libcairo2
Documentation
Build
Windows
Build native dlls
We use VS2017 to build native libraries as dll files.
Preparation:
- Open Visual Studio Installer, click
Modify
orMore/Modify
; - Check Desktop development with C++;
- In the Summary section on the right, open Desktop development with C++, then check Windows 8.1 SDK and UCRT SDK.
- Click
Modify
button.
- Open Visual Studio Installer, click
Build
- Open CarioSharp.sln with VS2017.
- Select a configuration:
Debug
orRelease
, and a platform:x86
orx64
. - Find the project
source/native/cairo
, right click and selectBuild
. - Built native dll files will be output to
source/native/cairo/bin/
.
Build C# projects
Build CairoSharp
In VS2017, right click the CairoSharp project then select
Build
. CairoSharp.dll and its native dependencies will be placed in the output dir such assource\CairoSharp\bin\Debug\netstandard1.6
.Build C# demos
In VS2017, right click a C# demo project then select
Build
. The built demo app, CairoSharp.dll and native dependencies will be placed in the output dir such asdemos\CairoDemo\bin\Debug\netcoreapp2.0
.
Common Errors:
Error C1083 Cannot open include file: 'assert.h': No such file or directory
Make sure Windows 8.1 SDK and UCRT SDK
is checked (See Preparation 3 above). See also this post.
Copying/License
LGPLv3
Project CairoSharp (not the native cairo lib but the C# one) is licensed under the LGPL v3 license.
CairoSharp, A C# wrapper of cairo which is a 2D vector rendering library
Copyright (C) 2017 gfoidl
Copyright (C) 2015-2018 Zou Wei, zwcloud@hotmail.com, https://zwcloud.net
Copyright (C) 2007-2015 Xamarin, Inc.
Copyright (C) 2006 Alp Toker
Copyright (C) 2005 John Luke
Copyright (C) 2004 Novell, Inc (http://www.novell.com)
Copyright (C) Ximian, Inc. 2003
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
The C# code files in CairoSharp project was taken from Mono/GTK#(Version 3.0.0), licensed under the GNU LGPL. So CairoSharp uses LGPL as well.
Native libraries
The Native project files is generated according to a VS2015 Solution from Cairo-VS.
cairo Version 1.15.12 COPYING Info
libpng Version 1.6.18 COPYING Info
pixman Version 0.32.6 COPYING Info
zlib Version 1.2.8 COPYING Info
freetype Version 2.6 COPYING Info
These libraries will be updated if new verisons are released.<br/> Last update date of these Native libraries: 2017-07-16
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp1.0 was computed. netcoreapp1.1 was computed. netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard1.6 is compatible. netstandard2.0 was computed. netstandard2.1 was computed. |
.NET Framework | net45 is compatible. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen30 was computed. tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.5
- No dependencies.
-
.NETStandard 1.6
- NETStandard.Library (>= 1.6.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on SharpCairo:
Repository | Stars |
---|---|
zwcloud/ImGui
Immediate Mode GUI for C#
|
Version | Downloads | Last updated |
---|---|---|
1.15.12-alpha | 1,251 | 11/24/2019 |
1.15.6-alpha | 1,117 | 3/5/2018 |
This is a test-only release of CairoSharp for cairo v1.15.6.
Package renamed to SharpCairo differ from CairoSharp provided by GTK#.