cairomm: Cairo Namespace Reference

cairomm 1.19.0

Classes | Typedefs | Enumerations | Functions
Cairo Namespace Reference

## Classes
struct | ColorStop
class | Context
| Context is the main class used to draw in cairomm. More...
class | Device
| Devices are the abstraction Cairo employs for the rendering system used by a cairo_surface_t. More...
class | FontFace
| A FontFace represents a particular font at a particular weight, slant, and other characteristic but no size, transformation, or size. More...
class | FontOptions
| The font options specify how fonts should be rendered. More...
class | FtFontFace
class | FtScaledFont
class | GlitzSurface
| A GlitzSurface provides a way to render to the X Window System using Glitz. More...
class | Gradient
class | ImageSurface
| Image surfaces provide the ability to render to memory buffers either allocated by cairo or by the calling code. More...
class | LinearGradient
class | logic_error
class | MappedImageSurface
| Image surface which is mapped to a target surface. More...
class | Matrix
| A Transformation matrix. More...
class | MeshPattern
| Mesh patterns are tensor-product patch meshes (type 7 shadings in PDF). More...
class | Path
| A data structure for holding a path. More...
class | Pattern
| Cairo::Pattern is the paint with which cairo draws. More...
class | PdfSurface
| A PdfSurface provides a way to render PDF documents from cairo. More...
class | PsSurface
| A PsSurface provides a way to render PostScript documents from cairo. More...
class | QuartzFontFace
| The Quartz font backend is primarily used to render text on Apple MacOS X systems. More...
class | QuartzSurface
| A QuartzSurface provides a way to render within Apple Mac OS X. More...
class | RadialGradient
class | RecordingSurface
| A recording surface is a surface that records all drawing operations at the highest level of the surface backend interface, (that is, the level of paint, mask, stroke, fill, and show_text_glyphs). More...
class | Region
| A simple graphical data type representing an area of integer-aligned rectangles. More...
class | SaveGuard
| RAII-style context save/restore class. More...
class | ScaledFont
| A ScaledFont is a font scaled to a particular size and device resolution. More...
class | Script
| The script surface provides the ability to render to a native script that matches the cairo drawing model. More...
class | ScriptSurface
| The script surface provides the ability to render to a native script that matches the cairo drawing model. More...
class | SolidPattern
class | Surface
| A cairo surface represents an image, either as the destination of a drawing operation or as source when drawing onto another surface. More...
class | SurfacePattern
class | SvgSurface
| A SvgSurface provides a way to render Scalable Vector Graphics (SVG) images from cairo. More...
class | ToyFontFace
| A simple font face used for the cairo 'toy' font API. More...
class | UserFontFace
| Font support with font data provided by the user. More...
class | Win32FontFace
| Font support for Microsoft Windows. More...
class | Win32PrintingSurface
| A multi-page vector surface type for printing on Microsoft Windows. More...
class | Win32ScaledFont
| Scaled Font implementation for Microsoft Windows fonts. More...
class | Win32Surface
| A Win32Surface provides a way to render within Microsoft Windows. More...
class | XcbDevice
| An XCB device. More...
class | XcbSurface
| Creates an XCB surface that draws to the given drawable. More...
class | XlibDevice
| An Xlib device. More...
class | XlibSurface
| An XlibSurface provides a way to render to the X Window System using XLib. More...

## Typedefs
template <typename T_CppObject >
using | RefPtr = std::shared_ptr< T_CppObject >
| RefPtr<> is a reference-counting shared smartpointer.
typedef cairo_rectangle_t | Rectangle
| See the cairo_rectangle_t reference in the cairo manual for more information.
typedef cairo_rectangle_int_t | RectangleInt
| See the cairo_rectangle_int_t reference in the cairo manual for more information.
typedef cairo_font_extents_t | FontExtents
| See the cairo_font_extents_t reference in the cairo manual for more information.
typedef cairo_text_extents_t | TextExtents
| See the cairo_text_extents_t reference in the cairo manual for more information.
typedef cairo_text_cluster_t | TextCluster
| See the cairo_text_cluster_t reference in the cairo manual for more information.
typedef cairo_glyph_t | Glyph
| See the cairo_glyph_t reference in the cairo manual for more information.

## Enumerations
enum | Antialias { ANTIALIAS_DEFAULT = CAIRO_ANTIALIAS_DEFAULT , ANTIALIAS_NONE = CAIRO_ANTIALIAS_NONE , ANTIALIAS_GRAY = CAIRO_ANTIALIAS_GRAY , ANTIALIAS_SUBPIXEL = CAIRO_ANTIALIAS_SUBPIXEL }
| Specifies the type of antialiasing to do when rendering text or shapes. More...
enum | Content { CONTENT_COLOR = CAIRO_CONTENT_COLOR , CONTENT_ALPHA = CAIRO_CONTENT_ALPHA , CONTENT_COLOR_ALPHA = CAIRO_CONTENT_COLOR_ALPHA }
| Cairo::Content is used to describe the content that a surface will contain, whether color information, alpha information (translucence vs. More...
enum | SubpixelOrder { SUBPIXEL_ORDER_DEFAULT = CAIRO_SUBPIXEL_ORDER_DEFAULT , SUBPIXEL_ORDER_RGB = CAIRO_SUBPIXEL_ORDER_RGB , SUBPIXEL_ORDER_BGR = CAIRO_SUBPIXEL_ORDER_BGR , SUBPIXEL_ORDER_VRGB = CAIRO_SUBPIXEL_ORDER_VRGB , SUBPIXEL_ORDER_VBGR = CAIRO_SUBPIXEL_ORDER_VBGR }
| The subpixel order specifies the order of color elements within each pixel on the display device when rendering with an antialiasing mode of Cairo::ANTIALIAS_SUBPIXEL. More...
enum | FontType { FONT_TYPE_TOY = CAIRO_FONT_TYPE_TOY , FONT_TYPE_FT = CAIRO_FONT_TYPE_FT , FONT_TYPE_WIN32 = CAIRO_FONT_TYPE_WIN32 , FONT_TYPE_QUARTZ = CAIRO_FONT_TYPE_QUARTZ , FONT_TYPE_USER = CAIRO_FONT_TYPE_USER }
| Cairo::FontType is used to describe the type of a given font face or scaled font. More...
enum | TextClusterFlags { TEXT_CLUSTER_FLAG_BACKWARD = CAIRO_TEXT_CLUSTER_FLAG_BACKWARD }
| Specifies properties of a text cluster mapping. More...
enum | FtSynthesize { FT_SYNTHESIZE_BOLT = CAIRO_FT_SYNTHESIZE_BOLD , FT_SYNTHESIZE_BOLD = CAIRO_FT_SYNTHESIZE_BOLD , FT_SYNTHESIZE_OBLIQUE = CAIRO_FT_SYNTHESIZE_OBLIQUE }
| A set of synthesis options to control how FreeType renders the glyphs for a particular font face. More...
enum | ScriptMode { SCRIPT_MODE_ASCII = CAIRO_SCRIPT_MODE_ASCII , SCRIPT_MODE_BINARY = CAIRO_SCRIPT_MODE_BINARY }
| A set of script output variants for the script surface. More...
enum | PdfVersion { PDF_VERSION_1_4 = CAIRO_PDF_VERSION_1_4 , PDF_VERSION_1_5 = CAIRO_PDF_VERSION_1_5 }
enum | PsLevel { PS_LEVEL_2 = CAIRO_PS_LEVEL_2 , PS_LEVEL_3 = CAIRO_PS_LEVEL_3 }
| describes the language level of the PostScript Language Reference that a generated PostScript file will conform to. More...
enum | SvgVersion { SVG_VERSION_1_1 = CAIRO_SVG_VERSION_1_1 , SVG_VERSION_1_2 = CAIRO_SVG_VERSION_1_2 }

## Functions
FtSynthesize | operator| (FtSynthesize a, FtSynthesize b)
FtSynthesize | operator& (FtSynthesize a, FtSynthesize b)
template<typename T_CppObject >
RefPtr< T_CppObject > | make_refptr_for_instance (T_CppObject * object)
| Create a RefPtr<> to an instance of any reference-counted class whose destructor is noexcept (the default for destructors).

## Typedef Documentation

## ◆ FontExtents

typedef cairo_font_extents_t Cairo::FontExtents

See the cairo_font_extents_t reference in the cairo manual for more information.

## ◆ Glyph

typedef cairo_glyph_t Cairo::Glyph

See the cairo_glyph_t reference in the cairo manual for more information.

## ◆ Rectangle

typedef cairo_rectangle_t Cairo::Rectangle

See the cairo_rectangle_t reference in the cairo manual for more information.

## ◆ RectangleInt

typedef cairo_rectangle_int_t Cairo::RectangleInt

See the cairo_rectangle_int_t reference in the cairo manual for more information.

## ◆ RefPtr

template <typename T_CppObject >

using Cairo::RefPtr = typedef std::shared_ptr<T_CppObject>

RefPtr<> is a reference-counting shared smartpointer.

Reference counting means that a shared reference count is incremented each time a RefPtr is copied, and decremented each time a RefPtr is destroyed, for instance when it leaves its scope. When the reference count reaches zero, the contained object is deleted

cairomm uses RefPtr so that you don't need to remember to delete the object explicitly, or know when a method expects you to delete the object that it returns, and to prevent any need to manually reference and unreference cairo objects.

See also
  Cairo::make_refptr_for_instance()

## ◆ TextCluster

typedef cairo_text_cluster_t Cairo::TextCluster

See the cairo_text_cluster_t reference in the cairo manual for more information.

## ◆ TextExtents

typedef cairo_text_extents_t Cairo::TextExtents

See the cairo_text_extents_t reference in the cairo manual for more information.

## Enumeration Type Documentation

## ◆ Antialias

enum Cairo::Antialias

Specifies the type of antialiasing to do when rendering text or shapes.

The interpretation of Cairo::ANTIALIAS_DEFAULT is left entirely up to the backend.

Enumerator
ANTIALIAS_DEFAULT | Use the default antialiasing for the subsystem and target device.
ANTIALIAS_NONE | Use bilevel alpha mask.
ANTIALIAS_GRAY | Perform single-color antialiasing (using shades of gray for black text on white background, for example).
ANTIALIAS_SUBPIXEL | Perform antialiasing by taing advantage of the order of subpixel elements on devices such as LCD panels.

## ◆ Content

enum Cairo::Content

Cairo::Content is used to describe the content that a surface will contain, whether color information, alpha information (translucence vs.

opacity), or both.

Enumerator
CONTENT_COLOR | The surface will hold color content only.
CONTENT_ALPHA | The surface will hold alpha content only.
CONTENT_COLOR_ALPHA | The surface will hold color and alpha content.

## ◆ FontType

enum Cairo::FontType

Cairo::FontType is used to describe the type of a given font face or scaled font.

The font types are also known as "font backends" within cairo.

New entries may be added in future versions.

Since
  1.2

Enumerator
FONT_TYPE_TOY | The font was created using cairo's toy font api.
FONT_TYPE_FT | The font is of type FreeType.
FONT_TYPE_WIN32 | The font is of type Win32.
FONT_TYPE_QUARTZ | The font is of type Quartz. Since 1.6
FONT_TYPE_USER | The font was created using cairo's user font api. Since 1.8

## ◆ FtSynthesize

enum Cairo::FtSynthesize

A set of synthesis options to control how FreeType renders the glyphs for a particular font face.

FreeType provides the ability to synthesize different glyphs from a base font, which is useful if you lack those glyphs from a true bold or oblique font.

Individual synthesis features of a `FtFontFace` can be set using `FtFontFace::set_synthesize()`, or disabled using `FtFontFace::unset_synthesize()`. The currently enabled set of synthesis options can be queried with `FtFontFace::get_synthesize()`.

Note: that when synthesizing glyphs, the font metrics returned will only be estimates.

Since
  1.12

Enumerator
FT_SYNTHESIZE_BOLT | Embolden the glyphs (redraw with a pixel offset). Deprecated: 1.20: Use FT_SYNTHESIZE_BOLD instead.
FT_SYNTHESIZE_BOLD | Embolden the glyphs (redraw with a pixel offset). Since cairomm 1.20:
FT_SYNTHESIZE_OBLIQUE | Slant the glyph outline by 12 degrees to the right.

## ◆ PdfVersion

enum Cairo::PdfVersion

Enumerator
PDF_VERSION_1_4 |
PDF_VERSION_1_5 |

## ◆ PsLevel

enum Cairo::PsLevel

describes the language level of the PostScript Language Reference that a generated PostScript file will conform to.

Enumerator
PS_LEVEL_2 |
PS_LEVEL_3 |

## ◆ ScriptMode

enum Cairo::ScriptMode

A set of script output variants for the script surface.

Since
  1.12

Enumerator
SCRIPT_MODE_ASCII | The output will be in readable text (default).
SCRIPT_MODE_BINARY | The output will use byte codes.

## ◆ SubpixelOrder

enum Cairo::SubpixelOrder

The subpixel order specifies the order of color elements within each pixel on the display device when rendering with an antialiasing mode of Cairo::ANTIALIAS_SUBPIXEL.

Enumerator
SUBPIXEL_ORDER_DEFAULT | Use the default subpixel order for for the target device.
SUBPIXEL_ORDER_RGB | Subpixel elements are arranged horizontally with red at the left.
SUBPIXEL_ORDER_BGR | Subpixel elements are arranged horizontally with blue at the left.
SUBPIXEL_ORDER_VRGB | Subpixel elements are arranged vertically with red at the top.
SUBPIXEL_ORDER_VBGR | Subpixel elements are arranged vertically with blue at the top.

## ◆ SvgVersion

enum Cairo::SvgVersion

Enumerator
SVG_VERSION_1_1 |
SVG_VERSION_1_2 |

## ◆ TextClusterFlags

enum Cairo::TextClusterFlags

Specifies properties of a text cluster mapping.

Since
  1.8

Enumerator
TEXT_CLUSTER_FLAG_BACKWARD | The clusters in the cluster array map to glyphs in the glyph array from end to start.

## Function Documentation

## ◆ make_refptr_for_instance()

template <typename T_CppObject >

RefPtr< T_CppObject > Cairo::make_refptr_for_instance | ( | T_CppObject * | object | ) |

Create a RefPtr<> to an instance of any reference-counted class whose destructor is noexcept (the default for destructors).

Normal application code should not need to use this. However, this is necessary when implementing create() methods for derived classes, such as a derived Cairo::UserFontFace.

Examples
  user-font.cc.

## ◆ operator&()

FtSynthesize Cairo::operator& | ( | FtSynthesize | a,
|  | FtSynthesize | b
| ) |  |
| inline

## ◆ operator|()

FtSynthesize Cairo::operator| | ( | FtSynthesize | a,
|  | FtSynthesize | b
| ) |  |
| inline