Module cairo.cairo
This module contains wrappers for most of cairo's fuctionality. Additional wrappers for subsets of cairo are available in the cairo.* modules.
Note
Most cairoD functions could throw an OutOfMemoryError. This is therefore not explicitly stated in the functions' api documenation.
See Also
Functions
Name | Description |
---|---|
formatStrideForWidth
|
This function provides a stride value that will respect all alignment requirements of the accelerated image-rendering code within cairo. |
point
|
Convenience function to create a Point !int or Point !double.
|
rectangle
|
Convenience function to create a Rectangle !int or Rectangle !double.
|
size
|
Convenience function to create a Size !int or Size !double.
|
throwError
|
Mainly used internally by cairoD.
If status is CAIRO_STATUS_NO_MEMORY a OutOfMemoryError is thrown.
If status is CAIRO_STATUS_SUCCESS nothing happens.
For all other statuses, this functions throws
a CairoException with the status value.
|
toCairoCount
|
Convert a size_t as given from a D arrays .length property to a cairo count type (int). |
Classes
Name | Description |
---|---|
CairoException
|
Exception thrown by cairoD if an error occurs. |
Device
|
Devices are the abstraction Cairo employs for the rendering system used
by a Surface . You can get the device of a surface using
Surface.getDevice ().
|
FontFace
|
Base class for font faces |
Gradient
|
Base class for LinearGradient and RadialGradient .
|
ImageSurface
|
Image Surfaces — Rendering to memory buffers |
LinearGradient
|
A linear gradient. |
Pattern
|
A Pattern represents a source when drawing onto a
Surface . There are different subtypes of Pattern ,
for different types of sources; for example,
SolidPattern.fromRGB creates a pattern for a solid
opaque color.
|
RadialGradient
|
A radial gradient. |
ScaledFont
|
Font face at particular size and options
|
SolidPattern
|
A solid pattern. |
Surface
|
Surface is the abstract type representing all different drawing targets
that cairo can render to. The actual drawings are performed using a cairo context.
|
SurfacePattern
|
A surface pattern.
|
ToyFontFace
|
Cairo toy font api's FontFace
|
Structs
Name | Description |
---|---|
Box
|
A simple struct representing a box. Used for Extents. |
ClipRange
|
RandomAccessRange to iterate or index into Clips of a Cairo Region .
This range keeps a reference to its Region object,
so it can be passed around without thinking about memory management.
|
Context
|
The cairo drawing context |
FontOptions
|
FontOptions - How a font should be rendered
|
Matrix
|
Wrapper for cairo's cairo_matrix_t.
A cairo_matrix_t holds an affine transformation, such as a scale ,
rotation, shear, or a combination of those. The transformation of
a point (x, y) is given by:
|
Path
|
Reference counted wrapper around cairo_path_t. This struct can only be obtained from cairoD. It cannot be created manually. |
PathElement
|
An element of a cairo Path and the objects iterated by a
PathRange .
|
PathRange
|
ForwardRange to iterate a cairo path .
This range keeps a reference to its Path object,
so it can be passed around without thinking about memory management.
|
Point
|
A simple struct to store the coordinates of a point as
doubles or integers.
|
Rectangle
|
A simple struct representing a rectangle with int or double values
|
Region
|
|
Resolution
|
A simple struct representing a resolution |
RGB
|
Struct representing a RGB color
|
RGBA
|
Struct representing a RGBA color
|
Size
|
A simple struct representing a size with only int or double values
|
TextGlyph
|
The mapping between utf8 and glyphs is provided by an array
of clusters. Each cluster covers a number of text bytes and
glyphs , and neighboring clusters cover neighboring areas of
utf8 and glyphs . The clusters should collectively cover
utf8 and glyphs in entirety.
|
Version
|
Cairo version information |
Aliases
Name | Type | Description |
---|---|---|
AntiAlias
|
cairo_antialias_t
|
Aliases for simple cairo enums and structs. Theses aliases provide D-like names when using the cairoD API. |
Content
|
cairo_content_t
|
Aliases for simple cairo enums and structs. Theses aliases provide D-like names when using the cairoD API. |
DeviceType
|
cairo_device_type_t
|
Aliases for simple cairo enums and structs. Theses aliases provide D-like names when using the cairoD API. |
Extend
|
cairo_extend_t
|
Aliases for simple cairo enums and structs. Theses aliases provide D-like names when using the cairoD API. |
FillRule
|
cairo_fill_rule_t
|
Aliases for simple cairo enums and structs. Theses aliases provide D-like names when using the cairoD API. |
Filter
|
cairo_filter_t
|
Aliases for simple cairo enums and structs. Theses aliases provide D-like names when using the cairoD API. |
FontExtents
|
cairo_font_extents_t
|
Aliases for simple cairo enums and structs. Theses aliases provide D-like names when using the cairoD API. |
FontSlant
|
cairo_font_slant_t
|
Aliases for simple cairo enums and structs. Theses aliases provide D-like names when using the cairoD API. |
FontType
|
cairo_font_type_t
|
Aliases for simple cairo enums and structs. Theses aliases provide D-like names when using the cairoD API. |
FontWeight
|
cairo_font_weight_t
|
Aliases for simple cairo enums and structs. Theses aliases provide D-like names when using the cairoD API. |
Format
|
cairo_format_t
|
Aliases for simple cairo enums and structs. Theses aliases provide D-like names when using the cairoD API. |
Glyph
|
cairo_glyph_t
|
Aliases for simple cairo enums and structs. Theses aliases provide D-like names when using the cairoD API. |
HintMetrics
|
cairo_hint_metrics_t
|
Aliases for simple cairo enums and structs. Theses aliases provide D-like names when using the cairoD API. |
HintStyle
|
cairo_hint_style_t
|
Aliases for simple cairo enums and structs. Theses aliases provide D-like names when using the cairoD API. |
LineCap
|
cairo_line_cap_t
|
Aliases for simple cairo enums and structs. Theses aliases provide D-like names when using the cairoD API. |
LineJoin
|
cairo_line_join_t
|
Aliases for simple cairo enums and structs. Theses aliases provide D-like names when using the cairoD API. |
Operator
|
cairo_operator_t
|
Aliases for simple cairo enums and structs. Theses aliases provide D-like names when using the cairoD API. |
PathElementType
|
cairo_path_data_type_t
|
Aliases for simple cairo enums and structs. Theses aliases provide D-like names when using the cairoD API. |
PatternType
|
cairo_pattern_type_t
|
Aliases for simple cairo enums and structs. Theses aliases provide D-like names when using the cairoD API. |
RegionOverlap
|
cairo_region_overlap_t
|
Aliases for simple cairo enums and structs. Theses aliases provide D-like names when using the cairoD API. |
SubpixelOrder
|
cairo_subpixel_order_t
|
Aliases for simple cairo enums and structs. Theses aliases provide D-like names when using the cairoD API. |
SurfaceType
|
cairo_surface_type_t
|
Aliases for simple cairo enums and structs. Theses aliases provide D-like names when using the cairoD API. |
TextCluster
|
cairo_text_cluster_t
|
Aliases for simple cairo enums and structs. Theses aliases provide D-like names when using the cairoD API. |
TextClusterFlags
|
cairo_text_cluster_flags_t
|
Aliases for simple cairo enums and structs. Theses aliases provide D-like names when using the cairoD API. |
TextExtents
|
cairo_text_extents_t
|
Aliases for simple cairo enums and structs. Theses aliases provide D-like names when using the cairoD API. |
Authors
Johannes Pfau | cairoD |
Andrej Mitrovic | cairoD |
cairo team | cairo |
Copyright
License
cairoD wrapper/bindings | Boost License 1.0 |
cairo | LGPL 2.1 / MPL 1.1 |