Expand description
§Cairo bindings
Rust bindings for Rust and wrappers for Cairo, part of gtk-rs-core.

Cairo 1.14 is the lowest supported version for the underlying library.
§Minimum supported Rust version
Currently, the minimum supported Rust version is 1.54.0.
§Default-on features
- use_glib - Use with glib
§Fileformat features
- png - Reading and writing PNG images
- pdf - Rendering PDF documents
- svg - Rendering SVG documents
- ps - Rendering PostScript documents
§Cairo API version features
- v1_16 - Use Cairo 1.16 APIs
§Documentation
§Documentation features
- dox - Used to keep system dependent items in documentation
§X Window features
- xcb - X Window System rendering using the XCB library
- xlib - X Window System rendering using XLib
§Windows API features
- win32-surface - Microsoft Windows surface support
§Using
We recommend using crates from crates.io, as demonstrated here.
If you want to track the bleeding edge, use the git dependency instead:
[dependencies]
cairo-rs = { git = "https://github.com/e-monkeys-tech/gtk4-rs-core.git", package = "cairo-rs" }Avoid mixing versioned and git crates like this:
# This will not compile
[dependencies]
cairo-rs = "0.13"
cairo-rs = { git = "https://github.com/e-monkeys-tech/gtk4-rs-core.git", package = "cairo-rs" }§See Also
§License
cairo is available under the MIT License, please refer to it.
Re-exports§
pub use ffi;pub use freetype_crate as freetype;freetypepub use glib;use_glib
Structs§
- Context
- Device
- Font
Extents - Font
Face - Font
Options - Glyph
- Gradient
- Image
Surface - Image
Surface Data - Image
Surface Data Owned - Linear
Gradient - Mapped
Image Surface - Matrix
- Mesh
- Path
- Path
Segments - Pattern
- PdfOutline
- PdfSurface
doxorpdf - PsSurface
doxorps - Quartz
Surface iOS or macOS or dox - Radial
Gradient - Recording
Surface - Rectangle
- Rectangle
Int - Rectangle
List - Region
- Scaled
Font - Solid
Pattern - Stream
With Error doxorpdforpsorsvg - Surface
- Surface
Pattern - SvgSurface
doxorsvg - Text
Cluster - Text
Extents - User
Data Key - Version
- Win32
Surface dox, or Windows andwin32-surface - XCBConnection
doxorxcb - XCBDrawable
doxorxcb - XCBPixmap
doxorxcb - XCBRender
Pict Form Info doxorxcb - XCBScreen
doxorxcb - XCBSurface
doxorxcb - XCBVisual
Type doxorxcb
Enums§
- Antialias
- Borrow
Error - Content
- Device
Type - Error
- Extend
- Fill
Rule - Filter
- Font
Slant - Font
Type - Font
Weight - Format
- FtSynthesize
doxorfreetype - Hint
Metrics - Hint
Style - IoError
- LineCap
- Line
Join - Mesh
Corner - Operator
- Path
Data Type - Path
Segment - Pattern
Type - PdfMetadata
doxorpdf - PdfVersion
doxorpdf - PsLevel
doxorps - Region
Overlap - Script
Mode doxorscript - Subpixel
Order - Surface
Type - SvgUnit
dox, orsvgandv1_16 - SvgVersion
doxorsvg - Text
Cluster Flags
Constants§
- CAIRO_
TAG_ DEST doxorv1_16 - CAIRO_
TAG_ LINK doxorv1_16 - MIME_
TYPE_ CCITT_ FAX doxorv1_16 - MIME_
TYPE_ CCITT_ FAX_ PARAMS doxorv1_16 - MIME_
TYPE_ EPS doxorv1_16 - MIME_
TYPE_ EPS_ PARAMS doxorv1_16 - MIME_
TYPE_ JBIG2 - MIME_
TYPE_ JBIG2_ GLOBAL - MIME_
TYPE_ JBIG2_ GLOBAL_ ID - MIME_
TYPE_ JP2 - MIME_
TYPE_ JPEG - MIME_
TYPE_ PNG - MIME_
TYPE_ UNIQUE_ ID - MIME_
TYPE_ URI - PDF_
OUTLINE_ ROOT doxorv1_16