Version0.7.0Verifiednot yet verifiedLicenseBSD-3-Clause
Readme
sigil-cairo
Cairo 2D graphics FFI bindings for Sigil.
Features
- Image surface creation and management
- Drawing context lifecycle (create, save, restore, destroy)
- Path operations (rectangle, arc, curve-to, line-to)
- Fill and stroke rendering
- Source color (RGB/RGBA) and pattern support
- Linear and radial gradients
- Text rendering and extents
- Transforms (translate, scale, rotate)
- PNG output
- Compositing operators
- Matrix operations
- Dash patterns
- Convenience macros (
with-cairo-context)
Usage
(import (sigil ffi)
(cairo))
(let ((surface (cairo-image-surface-create CAIRO_FORMAT_ARGB32 200 200)))
(with-cairo-context surface
(lambda (cr)
(cairo-set-source-rgb cr 0.2 0.3 0.8)
(cairo-rectangle cr 10.0 10.0 180.0 180.0)
(cairo-fill cr)))
(cairo-surface-write-to-png surface "output.png")
(cairo-surface-destroy surface))Dependencies
- sigil-stdlib
- sigil-ffi
Requires Cairo system library (libcairo).
System Prerequisites
- Cairo (
libcairo)
Development
sigil deps install
sigil build
sigil testLicense
BSD-3-Clause
Clone
$ git clone https://codeberg.org/sigil/sigil-cairo
Releases
v0.8.0 — latest by version, released 29 Mar 2026
All releases — 2 tags in this repository.
Source
One page per file, and every line has a permalink.
Recent commitsAtom
1 Aprcommit
29 Marcommit
Pin dependencies to version tags
95365489
29 Marcommit
a0086942
29 Marcommit
2bd608cd
16 Marcommit
12 Marcommit
3 Marcommit
3 Marcommit
2 Marcommit
2 Marcommit
The last 20 commits keep a page here. Everything older lives in the clone.