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;
pub 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
- PsSurface
- Quartz
Surface - Radial
Gradient - Recording
Surface - Rectangle
- Rectangle
Int - Rectangle
List - Region
- Scaled
Font - Solid
Pattern - Stream
With Error - Surface
- Surface
Pattern - SvgSurface
- Text
Cluster - Text
Extents - User
Data Key - Version
- Win32
Surface - XCBConnection
- XCBDrawable
- XCBPixmap
- XCBRender
Pict Form Info - XCBScreen
- XCBSurface
- XCBVisual
Type
Enums§
- Antialias
- Borrow
Error - Content
- Device
Type - Error
- Extend
- Fill
Rule - Filter
- Font
Slant - Font
Type - Font
Weight - Format
- FtSynthesize
- Hint
Metrics - Hint
Style - IoError
- LineCap
- Line
Join - Mesh
Corner - Operator
- Path
Data Type - Path
Segment - Pattern
Type - PdfMetadata
- PdfVersion
- PsLevel
- Region
Overlap - Script
Mode - Subpixel
Order - Surface
Type - SvgUnit
- SvgVersion
- Text
Cluster Flags
Constants§
- CAIRO_
TAG_ DEST - CAIRO_
TAG_ LINK - MIME_
TYPE_ CCITT_ FAX - MIME_
TYPE_ CCITT_ FAX_ PARAMS - MIME_
TYPE_ EPS - MIME_
TYPE_ EPS_ PARAMS - 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