Module Functions and Constants — Pycairo documentation (original) (raw)
Module Functions
Returns:
the encoded version
Returns the version of the underlying C cairo library, encoded in a single integer.
cairo.cairo_version_string() → str
Returns:
the encoded version
Returns the version of the underlying C cairo library as a human-readable string of the form “X.Y.Z”.
Returns:
a path to the directory containing the C header files
Gives the include path which should be passed to the compiler.
Added in version 1.16.0.
Module Constants
cairo.version_: str_ = Ellipsis
the pycairo version, as a string
cairo.version_info_: tuple[int, int, int]_ = Ellipsis
the pycairo version, as a tuple
cairo.CAIRO_VERSION_: int_ = Ellipsis
The version of cairo available at compile-time in the same format as returned by cairo_version()
Added in version 1.18.0.
cairo.CAIRO_VERSION_STRING_: str_ = Ellipsis
A human-readable string literal containing the version of cairo available at compile-time, in the form of “X.Y.Z”.
Added in version 1.18.0.
cairo.CAIRO_VERSION_MAJOR_: int_ = Ellipsis
The major component of the version of cairo available at compile-time.
Added in version 1.18.0.
cairo.CAIRO_VERSION_MINOR_: int_ = Ellipsis
The minor component of the version of cairo available at compile-time.
Added in version 1.18.0.
cairo.CAIRO_VERSION_MICRO_: int_ = Ellipsis
The micro component of the version of cairo available at compile-time.
Added in version 1.18.0.
cairo.HAS
1 if the feature is present in the underlying C cairo library, 0 otherwise.
cairo.HAS_ATSUI_FONT_: bool_ = Ellipsis
cairo.HAS_FT_FONT_: bool_ = Ellipsis
cairo.HAS_GLITZ_SURFACE_: bool_ = Ellipsis
cairo.HAS_IMAGE_SURFACE_: bool_ = Ellipsis
cairo.HAS_PDF_SURFACE_: bool_ = Ellipsis
cairo.HAS_PNG_FUNCTIONS_: bool_ = Ellipsis
cairo.HAS_PS_SURFACE_: bool_ = Ellipsis
cairo.HAS_RECORDING_SURFACE_: bool_ = Ellipsis
cairo.HAS_SVG_SURFACE_: bool_ = Ellipsis
cairo.HAS_USER_FONT_: bool_ = Ellipsis
cairo.HAS_QUARTZ_SURFACE_: bool_ = Ellipsis
cairo.HAS_WIN32_FONT_: bool_ = Ellipsis
cairo.HAS_WIN32_SURFACE_: bool_ = Ellipsis
cairo.HAS_XCB_SURFACE_: bool_ = Ellipsis
cairo.HAS_XLIB_SURFACE_: bool_ = Ellipsis
cairo.HAS_MIME_SURFACE_: bool_ = Ellipsis
Added in version 1.12.0.
cairo.HAS_SCRIPT_SURFACE_: bool_ = Ellipsis
Added in version 1.12.0.
cairo.HAS_TEE_SURFACE_: bool_ = Ellipsis
Added in version 1.15.3.
cairo.HAS_DWRITE_FONT_: bool_ = Ellipsis
Added in version 1.23.0.
cairo.TAG
cairo.TAG_DEST_: str_ = Ellipsis
Create a destination for a hyperlink. Destination tag attributes are detailed at Destinations.
Added in version 1.18.0: Only available with cairo 1.15.10+
cairo.TAG_LINK_: str_ = Ellipsis
Create hyperlink. Link tag attributes are detailed at Links.
Added in version 1.18.0: Only available with cairo 1.15.10+
cairo.TAG_CONTENT_: str_ = Ellipsis
Create a content tag.
Added in version 1.25.0: Only available with cairo 1.18.0+
cairo.TAG_CONTENT_REF_: str_ = Ellipsis
Create a content reference tag.
Added in version 1.25.0: Only available with cairo 1.18.0+
cairo.MIME_TYPE
cairo.MIME_TYPE_JP2_: str_ = Ellipsis
The Joint Photographic Experts Group (JPEG) 2000 image coding standard (ISO/IEC 15444-1).
Added in version 1.12.0.
cairo.MIME_TYPE_JPEG_: str_ = Ellipsis
The Joint Photographic Experts Group (JPEG) image coding standard (ISO/IEC 10918-1).
Added in version 1.12.0.
cairo.MIME_TYPE_PNG_: str_ = Ellipsis
The Portable Network Graphics image file format (ISO/IEC 15948).
Added in version 1.12.0.
cairo.MIME_TYPE_URI_: str_ = Ellipsis
URI for an image file (unofficial MIME type).
Added in version 1.12.0.
cairo.MIME_TYPE_UNIQUE_ID_: str_ = Ellipsis
Unique identifier for a surface (cairo specific MIME type). All surfaces with the same unique identifier will only be embedded once.
Added in version 1.12.0.
cairo.MIME_TYPE_CCITT_FAX_: str_ = Ellipsis
Group 3 or Group 4 CCITT facsimile encoding (International Telecommunication Union, Recommendations T.4 and T.6.)
Added in version 1.18.0: Only available with cairo 1.15.10+
cairo.MIME_TYPE_CCITT_FAX_PARAMS_: str_ = Ellipsis
Decode parameters for Group 3 or Group 4 CCITT facsimile encoding. SeeCCITT Fax Images.
Added in version 1.18.0: Only available with cairo 1.15.10+
cairo.MIME_TYPE_EPS_: str_ = Ellipsis
Encapsulated PostScript file. Encapsulated PostScript File Format Specification
Added in version 1.18.0: Only available with cairo 1.15.10+
cairo.MIME_TYPE_EPS_PARAMS_: str_ = Ellipsis
Embedding parameters Encapsulated PostScript data. See Embedding EPS files.
Added in version 1.18.0: Only available with cairo 1.15.10+
cairo.MIME_TYPE_JBIG2_: str_ = Ellipsis
Joint Bi-level Image Experts Group image coding standard (ISO/IEC 11544).
Added in version 1.18.0.
cairo.MIME_TYPE_JBIG2_GLOBAL_: str_ = Ellipsis
Joint Bi-level Image Experts Group image coding standard (ISO/IEC 11544) global segment.
Added in version 1.18.0.
cairo.MIME_TYPE_JBIG2_GLOBAL_ID_: str_ = Ellipsis
An unique identifier shared by a JBIG2 global segment and all JBIG2 images that depend on the global segment.
Added in version 1.18.0.
Other Constants
cairo.PDF_OUTLINE_ROOT_: int_ = Ellipsis
The root outline item in PDFSurface.add_outline()
Added in version 1.18.0: Only available with cairo 1.15.10+
cairo.COLOR_PALETTE_DEFAULT_: int_ = Ellipsis
The default color palette index. See FontOptions.set_color_palette()
Added in version 1.25.0: Only available with cairo 1.17.8+
Other Classes and Functions
class cairo._PathLike
This type only exists for documentation purposes.
On Unix it is equal to what Python allows as a filesystem path. On Windows with cairo <=1.15.8 only ANSI paths are supported. With cairo >=1.15.10 all paths are supported as long as they don’t contain surrogates.
Many functions taking a path also allow passing in an already open Python file object. This can be used to support all Python filesystem paths independent of the underlying platform or cairo version.
Added in version 1.15.1: Older versions only supported a subset of str paths
class cairo._FileLike
This type only exists for documentation purposes.
This represents a file object opened in binary mode: typing.BinaryIO
class cairo._SomeSurface
This type only exists for documentation purposes.
This represents a Surface subclass.
class cairo._WritableBuffer
This type only exists for documentation purposes.
This represents a writable buffer object, like memoryview,bytearray, array.array, collections.abc.Buffer, or anything implementing the buffer protocol.