Skip to main content

Crate cairo

Crate cairo 

Source
Expand description

§Cairo bindings

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

screenshot

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;freetype
pub use glib;use_glib

Structs§

Context
Device
FontExtents
FontFace
FontOptions
Glyph
Gradient
ImageSurface
ImageSurfaceData
ImageSurfaceDataOwned
LinearGradient
MappedImageSurface
Matrix
Mesh
Path
PathSegments
Pattern
PdfOutline
PdfSurfacedox or pdf
PsSurfacedox or ps
QuartzSurfaceiOS or macOS or dox
RadialGradient
RecordingSurface
Rectangle
RectangleInt
RectangleList
Region
ScaledFont
SolidPattern
StreamWithErrordox or pdf or ps or svg
Surface
SurfacePattern
SvgSurfacedox or svg
TextCluster
TextExtents
UserDataKey
Version
Win32Surfacedox, or Windows and win32-surface
XCBConnectiondox or xcb
XCBDrawabledox or xcb
XCBPixmapdox or xcb
XCBRenderPictFormInfodox or xcb
XCBScreendox or xcb
XCBSurfacedox or xcb
XCBVisualTypedox or xcb

Enums§

Antialias
BorrowError
Content
DeviceType
Error
Extend
FillRule
Filter
FontSlant
FontType
FontWeight
Format
FtSynthesizedox or freetype
HintMetrics
HintStyle
IoError
LineCap
LineJoin
MeshCorner
Operator
PathDataType
PathSegment
PatternType
PdfMetadatadox or pdf
PdfVersiondox or pdf
PsLeveldox or ps
RegionOverlap
ScriptModedox or script
SubpixelOrder
SurfaceType
SvgUnitdox, or svg and v1_16
SvgVersiondox or svg
TextClusterFlags

Constants§

CAIRO_TAG_DESTdox or v1_16
CAIRO_TAG_LINKdox or v1_16
MIME_TYPE_CCITT_FAXdox or v1_16
MIME_TYPE_CCITT_FAX_PARAMSdox or v1_16
MIME_TYPE_EPSdox or v1_16
MIME_TYPE_EPS_PARAMSdox or v1_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_ROOTdox or v1_16

Functions§

debug_reset_static_data⚠
version_string

Type Aliases§

Result