Cairo is a dual [[MPLv2]]/[[LGPLv2.1]] licensed 2D graphics / GUI library written in [[3. Reference/Software/Programming Languages/C|C]].
- Website
- Source
- Documentation
- AlternativeTo
> Cairo is a 2D graphics library with support for multiple output devices. Currently supported output targets include the X Window System (via both Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file output.
\- official website
# Notability
[Cairo](https://www.cairographics.org/) is 2D graphics library that abstracts the drawing mechanism and is compatible with many output targets including windowing systems and SVG.
Massive number of languages supported.
## Usage
Used by GTK, [[MorphOS]], Firefox, Inkscape, and many others.
# Philosophy
> 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.)
\- official website
# Platform Support
## Language Integration
- [[Ada]] : [CairoAda](http://sourceforge.net/projects/cairoada/)
- [[C++]] : [cairomm](https://www.cairographics.org/cairomm/)
- [[Common Lisp]] : [cl-cairo2](http://cliki.net/cl-cairo2), [cffi-cairo](http://www.cliki.net/cffi-cairo)
- COM-Wrapper : aka "ActiveX-dll" ... easiest to use with VB5/6 or VBA, comes with cairo as a "satellite-dll" (compiled with StdCall-callingconvention) [download-page:](http://www.thecommon.net/3.html) (a large VB-Democode-Tutorial is available there too)
- Harbour : [hbcairo](http://sourceforge.net/projects/harbour-project/)
- [[Haskell]] : [hscairo](https://www.cairographics.org/hscairo/)
- [[Java]] : [org.freedesktop.cairo](https://www.cairographics.org/cairo-java/) in java-gnome
- [[C Sharp|C#]] : [https://github.com/zwcloud/CairoSharp](https://github.com/zwcloud/CairoSharp)
- Mono and .NET bindings used to be bundled with the Mono distribution in the [Mono.Cairo](http://www.mono-project.com/Drawing#Mono.Cairo) library, but this is no longer maintained.
- At one point, bindings had also been provided at [NDesk](http://www.ndesk.org/).
- [Nickle](http://nickle.org/) : [cairo-nickle](https://www.cairographics.org/cairo-nickle/)
- Objective Caml : [cairo-ocaml](https://www.cairographics.org/cairo-ocaml/)
- [[Perl]] : [cairo-perl](https://www.cairographics.org/cairo-perl/)
- [[PHP]] : [cairo-php](https://www.cairographics.org/cairo-php/)
- [[Prolog]] : [PLcairo](https://github.com/keriharris/plcairo/)
- [[Python]] : [pycairo](https://www.cairographics.org/pycairo/), [qahirah](https://github.com/ldo/qahirah) high-level Pythonic binding, [cairocffi](https://pythonhosted.org/cairocffi/) binding created with CFFI, [pygobject](https://wiki.gnome.org/action/show/Projects/PyGObject) includes Cairo binding.
- [[Ruby]] : [rcairo](https://www.cairographics.org/rcairo/)
- [[Scheme]]: [guile-cairo](http://home.gna.org/guile-cairo/)
- [Ypsilon Scheme](http://code.google.com/p/ypsilon) ships with Cairo bindings
- [[Squeak]] : [Rome](http://www.squeaksource.com/Rome/)
- Digitalmars [[D]]: [cairoD](http://www.dsource.org/projects/bindings/wiki/CairoGraphics/) - simple wrapper for D direct C API
- [[Lua]] : [Lua-Cairo](http://luaforge.net/projects/luacairo/), [Lua-OOCairo](http://www.daizucms.org/lua/library/oocairo/), [LuaCairo](http://www.dynaset.org/dogusanh/)
- [LuaJIT](http://www.luajit.org/) : [luapower/cairo](http://luapower.com/cairo)
- [[Vala]]
# Features
# Tips
# References