import "github.com/martine/gocairo/cairo"
Package cairo wraps the Cairo graphics library.
Most functions are one-to-one with the corresponding Cairo functions. See the C documentation at http://cairographics.org/manual/ for details.
Though Cairo is a C API, it has a simple notion of subtypes; for example, an ImageSurface is a Surface with some extra methods.
These are implemented in the Go API as two separate types with embedding. Any method on a Surface can also be called on an ImageSurface (and similarly for Pattern and MeshPattern and so on). If a function expects a Surface as an argument and you have an ImageSurface, you must call it like foo(imageSurface.Surface).
Cairo's C API handles errors in a way similar to C's errno -- you're supposed to check for an error after making each Cairo call. But in practice the only errors Cairo can encounter are programmer errors, such as calling PopGroup() when you haven't called PushGroup() first.
Because of this, this library implicitly checks the error value after every call and panic()s on any error. The value passed to panic() is a cairo.Status which can be compared against various constants; it also implements Error so it can be stringified.
(There's a few places that still accidentally return an error, but those will be fixed.)
cairo.go doc.go path.go util.go
See cairo_version().
C API documentation: http://cairographics.org/manual/cairo-Version-Information.html#cairo-version
See cairo_version_string().
C API documentation: http://cairographics.org/manual/cairo-Version-Information.html#cairo-version-string
See cairo_antialias_t.
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-antialias-t
const ( AntialiasDefault Antialias = C.CAIRO_ANTIALIAS_DEFAULT AntialiasNone Antialias = C.CAIRO_ANTIALIAS_NONE AntialiasGray Antialias = C.CAIRO_ANTIALIAS_GRAY AntialiasSubpixel Antialias = C.CAIRO_ANTIALIAS_SUBPIXEL AntialiasFast Antialias = C.CAIRO_ANTIALIAS_FAST AntialiasGood Antialias = C.CAIRO_ANTIALIAS_GOOD AntialiasBest Antialias = C.CAIRO_ANTIALIAS_BEST )
String implements the Stringer interface, which is used in places like fmt's %q. For all enums like this it returns the Go name of the constant.
See cairo_content_t.
C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-content-t
const ( ContentColor Content = C.CAIRO_CONTENT_COLOR ContentAlpha Content = C.CAIRO_CONTENT_ALPHA ContentColorAlpha Content = C.CAIRO_CONTENT_COLOR_ALPHA )
String implements the Stringer interface, which is used in places like fmt's %q. For all enums like this it returns the Go name of the constant.
See cairo_t.
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-t
Construct a Context from a C cairo_t* found from some exernal source. It is the caller's responsibility to ensure the pointer lives.
See cairo_create().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-create
Wrap a C cairo_t* found from some external source as a *Context. The Go side will destroy the reference when it's no longer used.
See cairo_append_path().
C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-append-path
See cairo_arc().
C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-arc
See cairo_arc_negative().
C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-arc-negative
See cairo_clip().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-clip
See cairo_clip_extents().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-clip-extents
See cairo_clip_preserve().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-clip-preserve
See cairo_close_path().
C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-close-path
See cairo_copy_page().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-copy-page
See cairo_copy_path().
C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-copy-path
See cairo_copy_path_flat().
C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-copy-path-flat
See cairo_curve_to().
C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-curve-to
See cairo_device_to_user().
C API documentation: http://cairographics.org/manual/cairo-Transformations.html#cairo-device-to-user
See cairo_device_to_user_distance().
C API documentation: http://cairographics.org/manual/cairo-Transformations.html#cairo-device-to-user-distance
See cairo_fill().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-fill
See cairo_fill_extents().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-fill-extents
See cairo_fill_preserve().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-fill-preserve
func (cr *Context) FontExtents(extents *FontExtents)
See cairo_font_extents().
C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-font-extents
See cairo_get_antialias().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-antialias
See cairo_get_current_point().
C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-get-current-point
See cairo_get_dash().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-dash
See cairo_get_dash_count().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-dash-count
See cairo_get_fill_rule().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-fill-rule
See cairo_get_font_face().
C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-get-font-face
See cairo_get_font_matrix().
C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-get-font-matrix
func (cr *Context) GetFontOptions(options *FontOptions)
See cairo_get_font_options().
C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-get-font-options
See cairo_get_group_target().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-group-target
See cairo_get_line_cap().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-line-cap
See cairo_get_line_join().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-line-join
See cairo_get_line_width().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-line-width
See cairo_get_matrix().
C API documentation: http://cairographics.org/manual/cairo-Transformations.html#cairo-get-matrix
See cairo_get_miter_limit().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-miter-limit
See cairo_get_operator().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-operator
func (cr *Context) GetScaledFont() *ScaledFont
See cairo_get_scaled_font().
C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-get-scaled-font
See cairo_get_source().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-source
See cairo_get_target().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-target
See cairo_get_tolerance().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-tolerance
func (cr *Context) GlyphExtents(glyphs []Glyph, extents *TextExtents)
See cairo_glyph_extents().
C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-glyph-extents
See cairo_glyph_path().
C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-glyph-path
See cairo_has_current_point().
C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-has-current-point
See cairo_identity_matrix().
C API documentation: http://cairographics.org/manual/cairo-Transformations.html#cairo-identity-matrix
See cairo_in_clip().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-in-clip
See cairo_in_fill().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-in-fill
See cairo_in_stroke().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-in-stroke
See cairo_line_to().
C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-line-to
See cairo_mask().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-mask
See cairo_mask_surface().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-mask-surface
See cairo_move_to().
C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-move-to
See cairo_new_path().
C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-new-path
See cairo_new_sub_path().
C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-new-sub-path
See cairo_paint().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-paint
See cairo_paint_with_alpha().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-paint-with-alpha
See cairo_path_extents().
C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-path-extents
See cairo_pop_group().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-pop-group
See cairo_pop_group_to_source().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-pop-group-to-source
See cairo_push_group().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-push-group
See cairo_push_group_with_content().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-push-group-with-content
See cairo_rectangle().
C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-rectangle
See cairo_rel_curve_to().
C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-rel-curve-to
See cairo_rel_line_to().
C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-rel-line-to
See cairo_rel_move_to().
C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-rel-move-to
See cairo_reset_clip().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-reset-clip
See cairo_restore().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-restore
See cairo_rotate().
C API documentation: http://cairographics.org/manual/cairo-Transformations.html#cairo-rotate
See cairo_save().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-save
See cairo_scale().
C API documentation: http://cairographics.org/manual/cairo-Transformations.html#cairo-scale
func (cr *Context) SelectFontFace(family string, slant FontSlant, weight FontWeight)
See cairo_select_font_face().
C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-select-font-face
See cairo_set_antialias().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-antialias
See cairo_set_dash().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-dash
See cairo_set_fill_rule().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-fill-rule
See cairo_set_font_face().
C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-set-font-face
See cairo_set_font_matrix().
C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-set-font-matrix
func (cr *Context) SetFontOptions(options *FontOptions)
See cairo_set_font_options().
C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-set-font-options
See cairo_set_font_size().
C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-set-font-size
See cairo_set_line_cap().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-line-cap
See cairo_set_line_join().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-line-join
See cairo_set_line_width().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-line-width
See cairo_set_matrix().
C API documentation: http://cairographics.org/manual/cairo-Transformations.html#cairo-set-matrix
See cairo_set_miter_limit().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-miter-limit
See cairo_set_operator().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-operator
func (cr *Context) SetScaledFont(scaledFont *ScaledFont)
See cairo_set_scaled_font().
C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-set-scaled-font
See cairo_set_source().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-source
See cairo_set_source_rgb().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-source-rgb
See cairo_set_source_rgba().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-source-rgba
See cairo_set_source_surface().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-source-surface
See cairo_set_tolerance().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-tolerance
See cairo_show_glyphs().
C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-show-glyphs
See cairo_show_page().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-show-page
See cairo_show_text().
C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-show-text
See cairo_stroke().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-stroke
See cairo_stroke_extents().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-stroke-extents
See cairo_stroke_preserve().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-stroke-preserve
func (cr *Context) TextExtents(utf8 string, extents *TextExtents)
See cairo_text_extents().
C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-text-extents
See cairo_text_path().
C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-text-path
See cairo_transform().
C API documentation: http://cairographics.org/manual/cairo-Transformations.html#cairo-transform
See cairo_translate().
C API documentation: http://cairographics.org/manual/cairo-Transformations.html#cairo-translate
See cairo_user_to_device().
C API documentation: http://cairographics.org/manual/cairo-Transformations.html#cairo-user-to-device
See cairo_user_to_device_distance().
C API documentation: http://cairographics.org/manual/cairo-Transformations.html#cairo-user-to-device-distance
See cairo_device_t.
C API documentation: http://cairographics.org/manual/cairo-cairo-device-t.html#cairo-device-t
Construct a Device from a C cairo_device_t* found from some exernal source. It is the caller's responsibility to ensure the pointer lives.
Wrap a C cairo_device_t* found from some external source as a *Device. The Go side will destroy the reference when it's no longer used.
See cairo_device_acquire().
C API documentation: http://cairographics.org/manual/cairo-cairo-device-t.html#cairo-device-acquire
See cairo_device_finish().
C API documentation: http://cairographics.org/manual/cairo-cairo-device-t.html#cairo-device-finish
See cairo_device_flush().
C API documentation: http://cairographics.org/manual/cairo-cairo-device-t.html#cairo-device-flush
func (device *Device) GetType() DeviceType
See cairo_device_get_type().
C API documentation: http://cairographics.org/manual/cairo-cairo-device-t.html#cairo-device-get-type
See cairo_device_observer_elapsed().
C API documentation: http://cairographics.org/manual/cairo-cairo-device-t.html#cairo-device-observer-elapsed
See cairo_device_observer_fill_elapsed().
C API documentation: http://cairographics.org/manual/cairo-cairo-device-t.html#cairo-device-observer-fill-elapsed
See cairo_device_observer_glyphs_elapsed().
C API documentation: http://cairographics.org/manual/cairo-cairo-device-t.html#cairo-device-observer-glyphs-elapsed
See cairo_device_observer_mask_elapsed().
C API documentation: http://cairographics.org/manual/cairo-cairo-device-t.html#cairo-device-observer-mask-elapsed
See cairo_device_observer_paint_elapsed().
C API documentation: http://cairographics.org/manual/cairo-cairo-device-t.html#cairo-device-observer-paint-elapsed
See cairo_device_observer_stroke_elapsed().
C API documentation: http://cairographics.org/manual/cairo-cairo-device-t.html#cairo-device-observer-stroke-elapsed
See cairo_device_release().
C API documentation: http://cairographics.org/manual/cairo-cairo-device-t.html#cairo-device-release
See cairo_device_type_t.
C API documentation: http://cairographics.org/manual/cairo-cairo-device-t.html#cairo-device-type-t
const ( DeviceTypeDRM DeviceType = C.CAIRO_DEVICE_TYPE_DRM DeviceTypeGL DeviceType = C.CAIRO_DEVICE_TYPE_GL DeviceTypeScript DeviceType = C.CAIRO_DEVICE_TYPE_SCRIPT DeviceTypeXCB DeviceType = C.CAIRO_DEVICE_TYPE_XCB DeviceTypeXlib DeviceType = C.CAIRO_DEVICE_TYPE_XLIB DeviceTypeXML DeviceType = C.CAIRO_DEVICE_TYPE_XML DeviceTypeCOGL DeviceType = C.CAIRO_DEVICE_TYPE_COGL DeviceTypeWin32 DeviceType = C.CAIRO_DEVICE_TYPE_WIN32 DeviceTypeInvalid DeviceType = C.CAIRO_DEVICE_TYPE_INVALID )
func (i DeviceType) String() string
String implements the Stringer interface, which is used in places like fmt's %q. For all enums like this it returns the Go name of the constant.
See cairo_extend_t.
C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-extend-t
const ( ExtendNone Extend = C.CAIRO_EXTEND_NONE ExtendRepeat Extend = C.CAIRO_EXTEND_REPEAT ExtendReflect Extend = C.CAIRO_EXTEND_REFLECT ExtendPad Extend = C.CAIRO_EXTEND_PAD )
String implements the Stringer interface, which is used in places like fmt's %q. For all enums like this it returns the Go name of the constant.
See cairo_fill_rule_t.
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-fill-rule-t
const ( FillRuleWinding FillRule = C.CAIRO_FILL_RULE_WINDING FillRuleEvenOdd FillRule = C.CAIRO_FILL_RULE_EVEN_ODD )
String implements the Stringer interface, which is used in places like fmt's %q. For all enums like this it returns the Go name of the constant.
See cairo_filter_t.
C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-filter-t
const ( FilterFast Filter = C.CAIRO_FILTER_FAST FilterGood Filter = C.CAIRO_FILTER_GOOD FilterBest Filter = C.CAIRO_FILTER_BEST FilterNearest Filter = C.CAIRO_FILTER_NEAREST FilterBilinear Filter = C.CAIRO_FILTER_BILINEAR FilterGaussian Filter = C.CAIRO_FILTER_GAUSSIAN )
String implements the Stringer interface, which is used in places like fmt's %q. For all enums like this it returns the Go name of the constant.
type FontExtents struct { Ascent float64 Descent float64 Height float64 MaxXAdvance float64 MaxYAdvance float64 }
See cairo_font_extents_t.
C API documentation: http://cairographics.org/manual/cairo-cairo-scaled-font-t.html#cairo-font-extents-t
See cairo_font_face_t.
C API documentation: http://cairographics.org/manual/cairo-cairo-font-face-t.html#cairo-font-face-t
Construct a FontFace from a C cairo_font_face_t* found from some exernal source. It is the caller's responsibility to ensure the pointer lives.
See cairo_user_font_face_create().
C API documentation: http://cairographics.org/manual/cairo-User-Fonts.html#cairo-user-font-face-create
Wrap a C cairo_font_face_t* found from some external source as a *FontFace. The Go side will destroy the reference when it's no longer used.
See cairo_font_face_get_type().
C API documentation: http://cairographics.org/manual/cairo-cairo-font-face-t.html#cairo-font-face-get-type
See cairo_font_options_t.
C API documentation: http://cairographics.org/manual/cairo-cairo-font-options-t.html#cairo-font-options-t
func BorrowFontOptions(p unsafe.Pointer) *FontOptions
Construct a FontOptions from a C cairo_font_options_t* found from some exernal source. It is the caller's responsibility to ensure the pointer lives.
func FontOptionsCreate() *FontOptions
See cairo_font_options_create().
C API documentation: http://cairographics.org/manual/cairo-cairo-font-options-t.html#cairo-font-options-create
func WrapFontOptions(p unsafe.Pointer) *FontOptions
Wrap a C cairo_font_options_t* found from some external source as a *FontOptions. The Go side will destroy the reference when it's no longer used.
func (original *FontOptions) Copy() *FontOptions
See cairo_font_options_copy().
C API documentation: http://cairographics.org/manual/cairo-cairo-font-options-t.html#cairo-font-options-copy
func (options *FontOptions) Equal(other *FontOptions) bool
See cairo_font_options_equal().
C API documentation: http://cairographics.org/manual/cairo-cairo-font-options-t.html#cairo-font-options-equal
func (options *FontOptions) GetAntialias() Antialias
See cairo_font_options_get_antialias().
C API documentation: http://cairographics.org/manual/cairo-cairo-font-options-t.html#cairo-font-options-get-antialias
func (options *FontOptions) GetHintMetrics() HintMetrics
See cairo_font_options_get_hint_metrics().
C API documentation: http://cairographics.org/manual/cairo-cairo-font-options-t.html#cairo-font-options-get-hint-metrics
func (options *FontOptions) GetHintStyle() HintStyle
See cairo_font_options_get_hint_style().
C API documentation: http://cairographics.org/manual/cairo-cairo-font-options-t.html#cairo-font-options-get-hint-style
func (options *FontOptions) GetSubpixelOrder() SubpixelOrder
See cairo_font_options_get_subpixel_order().
C API documentation: http://cairographics.org/manual/cairo-cairo-font-options-t.html#cairo-font-options-get-subpixel-order
func (options *FontOptions) Hash() uint32
See cairo_font_options_hash().
C API documentation: http://cairographics.org/manual/cairo-cairo-font-options-t.html#cairo-font-options-hash
func (options *FontOptions) Merge(other *FontOptions)
See cairo_font_options_merge().
C API documentation: http://cairographics.org/manual/cairo-cairo-font-options-t.html#cairo-font-options-merge
func (options *FontOptions) SetAntialias(antialias Antialias)
See cairo_font_options_set_antialias().
C API documentation: http://cairographics.org/manual/cairo-cairo-font-options-t.html#cairo-font-options-set-antialias
func (options *FontOptions) SetHintMetrics(hintMetrics HintMetrics)
See cairo_font_options_set_hint_metrics().
C API documentation: http://cairographics.org/manual/cairo-cairo-font-options-t.html#cairo-font-options-set-hint-metrics
func (options *FontOptions) SetHintStyle(hintStyle HintStyle)
See cairo_font_options_set_hint_style().
C API documentation: http://cairographics.org/manual/cairo-cairo-font-options-t.html#cairo-font-options-set-hint-style
func (options *FontOptions) SetSubpixelOrder(subpixelOrder SubpixelOrder)
See cairo_font_options_set_subpixel_order().
C API documentation: http://cairographics.org/manual/cairo-cairo-font-options-t.html#cairo-font-options-set-subpixel-order
See cairo_font_slant_t.
C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-font-slant-t
const ( FontSlantNormal FontSlant = C.CAIRO_FONT_SLANT_NORMAL FontSlantItalic FontSlant = C.CAIRO_FONT_SLANT_ITALIC FontSlantOblique FontSlant = C.CAIRO_FONT_SLANT_OBLIQUE )
String implements the Stringer interface, which is used in places like fmt's %q. For all enums like this it returns the Go name of the constant.
See cairo_font_type_t.
C API documentation: http://cairographics.org/manual/cairo-cairo-font-face-t.html#cairo-font-type-t
const ( FontTypeToy FontType = C.CAIRO_FONT_TYPE_TOY FontTypeFt FontType = C.CAIRO_FONT_TYPE_FT FontTypeWin32 FontType = C.CAIRO_FONT_TYPE_WIN32 FontTypeQuartz FontType = C.CAIRO_FONT_TYPE_QUARTZ FontTypeUser FontType = C.CAIRO_FONT_TYPE_USER )
String implements the Stringer interface, which is used in places like fmt's %q. For all enums like this it returns the Go name of the constant.
See cairo_font_weight_t.
C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-font-weight-t
const ( FontWeightNormal FontWeight = C.CAIRO_FONT_WEIGHT_NORMAL FontWeightBold FontWeight = C.CAIRO_FONT_WEIGHT_BOLD )
func (i FontWeight) String() string
String implements the Stringer interface, which is used in places like fmt's %q. For all enums like this it returns the Go name of the constant.
See cairo_format_t.
C API documentation: http://cairographics.org/manual/cairo-Image-Surfaces.html#cairo-format-t
const ( FormatInvalid Format = C.CAIRO_FORMAT_INVALID FormatARGB32 Format = C.CAIRO_FORMAT_ARGB32 FormatRGB24 Format = C.CAIRO_FORMAT_RGB24 FormatA8 Format = C.CAIRO_FORMAT_A8 FormatA1 Format = C.CAIRO_FORMAT_A1 FormatRGB16565 Format = C.CAIRO_FORMAT_RGB16_565 FormatRGB30 Format = C.CAIRO_FORMAT_RGB30 )
See cairo_format_stride_for_width().
C API documentation: http://cairographics.org/manual/cairo-Image-Surfaces.html#cairo-format-stride-for-width
String implements the Stringer interface, which is used in places like fmt's %q. For all enums like this it returns the Go name of the constant.
See cairo_glyph_t.
C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-glyph-t
See cairo_hint_metrics_t.
C API documentation: http://cairographics.org/manual/cairo-cairo-font-options-t.html#cairo-hint-metrics-t
const ( HintMetricsDefault HintMetrics = C.CAIRO_HINT_METRICS_DEFAULT HintMetricsOff HintMetrics = C.CAIRO_HINT_METRICS_OFF HintMetricsOn HintMetrics = C.CAIRO_HINT_METRICS_ON )
func (i HintMetrics) String() string
String implements the Stringer interface, which is used in places like fmt's %q. For all enums like this it returns the Go name of the constant.
See cairo_hint_style_t.
C API documentation: http://cairographics.org/manual/cairo-cairo-font-options-t.html#cairo-hint-style-t
const ( HintStyleDefault HintStyle = C.CAIRO_HINT_STYLE_DEFAULT HintStyleNone HintStyle = C.CAIRO_HINT_STYLE_NONE HintStyleSlight HintStyle = C.CAIRO_HINT_STYLE_SLIGHT HintStyleMedium HintStyle = C.CAIRO_HINT_STYLE_MEDIUM HintStyleFull HintStyle = C.CAIRO_HINT_STYLE_FULL )
String implements the Stringer interface, which is used in places like fmt's %q. For all enums like this it returns the Go name of the constant.
func ImageSurfaceCreate(format Format, width, height int) *ImageSurface
See cairo_image_surface_create().
C API documentation: http://cairographics.org/manual/cairo-Image-Surfaces.html#cairo-image-surface-create
func ImageSurfaceCreateFromPNGStream(r io.Reader) (*ImageSurface, error)
ImageSurfaceCreateFromPNGStream creates an ImageSurface from a stream of PNG data.
func (i *ImageSurface) Data() []byte
See cairo_image_surface_get_data().
C API documentation: http://cairographics.org/manual/cairo-Image-Surfaces.html#cairo-image-surface-get-data
func (surface *ImageSurface) GetFormat() Format
See cairo_image_surface_get_format().
C API documentation: http://cairographics.org/manual/cairo-Image-Surfaces.html#cairo-image-surface-get-format
func (surface *ImageSurface) GetHeight() int
See cairo_image_surface_get_height().
C API documentation: http://cairographics.org/manual/cairo-Image-Surfaces.html#cairo-image-surface-get-height
func (surface *ImageSurface) GetStride() int
See cairo_image_surface_get_stride().
C API documentation: http://cairographics.org/manual/cairo-Image-Surfaces.html#cairo-image-surface-get-stride
func (surface *ImageSurface) GetWidth() int
See cairo_image_surface_get_width().
C API documentation: http://cairographics.org/manual/cairo-Image-Surfaces.html#cairo-image-surface-get-width
See cairo_line_cap_t.
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-line-cap-t
const ( LineCapButt LineCap = C.CAIRO_LINE_CAP_BUTT LineCapRound LineCap = C.CAIRO_LINE_CAP_ROUND LineCapSquare LineCap = C.CAIRO_LINE_CAP_SQUARE )
String implements the Stringer interface, which is used in places like fmt's %q. For all enums like this it returns the Go name of the constant.
See cairo_line_join_t.
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-line-join-t
const ( LineJoinMiter LineJoin = C.CAIRO_LINE_JOIN_MITER LineJoinRound LineJoin = C.CAIRO_LINE_JOIN_ROUND LineJoinBevel LineJoin = C.CAIRO_LINE_JOIN_BEVEL )
String implements the Stringer interface, which is used in places like fmt's %q. For all enums like this it returns the Go name of the constant.
See cairo_matrix_t.
C API documentation: http://cairographics.org/manual/cairo-cairo-matrix-t.html#cairo-matrix-t
See cairo_matrix_init_identity().
C API documentation: http://cairographics.org/manual/cairo-cairo-matrix-t.html#cairo-matrix-init-identity
See cairo_matrix_init_rotate().
C API documentation: http://cairographics.org/manual/cairo-cairo-matrix-t.html#cairo-matrix-init-rotate
See cairo_matrix_init_scale().
C API documentation: http://cairographics.org/manual/cairo-cairo-matrix-t.html#cairo-matrix-init-scale
See cairo_matrix_init_translate().
C API documentation: http://cairographics.org/manual/cairo-cairo-matrix-t.html#cairo-matrix-init-translate
See cairo_matrix_invert().
C API documentation: http://cairographics.org/manual/cairo-cairo-matrix-t.html#cairo-matrix-invert
See cairo_matrix_multiply().
C API documentation: http://cairographics.org/manual/cairo-cairo-matrix-t.html#cairo-matrix-multiply
See cairo_matrix_rotate().
C API documentation: http://cairographics.org/manual/cairo-cairo-matrix-t.html#cairo-matrix-rotate
See cairo_matrix_scale().
C API documentation: http://cairographics.org/manual/cairo-cairo-matrix-t.html#cairo-matrix-scale
See cairo_matrix_transform_distance().
C API documentation: http://cairographics.org/manual/cairo-cairo-matrix-t.html#cairo-matrix-transform-distance
See cairo_matrix_transform_point().
C API documentation: http://cairographics.org/manual/cairo-cairo-matrix-t.html#cairo-matrix-transform-point
See cairo_matrix_translate().
C API documentation: http://cairographics.org/manual/cairo-cairo-matrix-t.html#cairo-matrix-translate
func (pattern *MeshPattern) BeginPatch()
See cairo_mesh_pattern_begin_patch().
C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-mesh-pattern-begin-patch
func (pattern *MeshPattern) CurveTo(x1, y1, x2, y2, x3, y3 float64)
See cairo_mesh_pattern_curve_to().
C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-mesh-pattern-curve-to
func (pattern *MeshPattern) EndPatch()
See cairo_mesh_pattern_end_patch().
C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-mesh-pattern-end-patch
func (pattern *MeshPattern) GetPath(patchNum int) *Path
See cairo_mesh_pattern_get_path().
C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-mesh-pattern-get-path
func (pattern *MeshPattern) LineTo(x, y float64)
See cairo_mesh_pattern_line_to().
C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-mesh-pattern-line-to
func (pattern *MeshPattern) MoveTo(x, y float64)
See cairo_mesh_pattern_move_to().
C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-mesh-pattern-move-to
func (pattern *MeshPattern) SetControlPoint(pointNum int, x, y float64)
See cairo_mesh_pattern_set_control_point().
C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-mesh-pattern-set-control-point
func (pattern *MeshPattern) SetCornerColorRGB(cornerNum int, red, green, blue float64)
See cairo_mesh_pattern_set_corner_color_rgb().
C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-mesh-pattern-set-corner-color-rgb
func (pattern *MeshPattern) SetCornerColorRGBA(cornerNum int, red, green, blue, alpha float64)
See cairo_mesh_pattern_set_corner_color_rgba().
C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-mesh-pattern-set-corner-color-rgba
See cairo_operator_t.
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-operator-t
const ( OperatorClear Operator = C.CAIRO_OPERATOR_CLEAR OperatorSource Operator = C.CAIRO_OPERATOR_SOURCE OperatorOver Operator = C.CAIRO_OPERATOR_OVER OperatorIn Operator = C.CAIRO_OPERATOR_IN OperatorOut Operator = C.CAIRO_OPERATOR_OUT OperatorAtop Operator = C.CAIRO_OPERATOR_ATOP OperatorDest Operator = C.CAIRO_OPERATOR_DEST OperatorDestOver Operator = C.CAIRO_OPERATOR_DEST_OVER OperatorDestIn Operator = C.CAIRO_OPERATOR_DEST_IN OperatorDestOut Operator = C.CAIRO_OPERATOR_DEST_OUT OperatorDestAtop Operator = C.CAIRO_OPERATOR_DEST_ATOP OperatorXOR Operator = C.CAIRO_OPERATOR_XOR OperatorAdd Operator = C.CAIRO_OPERATOR_ADD OperatorSaturate Operator = C.CAIRO_OPERATOR_SATURATE OperatorMultiply Operator = C.CAIRO_OPERATOR_MULTIPLY OperatorScreen Operator = C.CAIRO_OPERATOR_SCREEN OperatorOverlay Operator = C.CAIRO_OPERATOR_OVERLAY OperatorDarken Operator = C.CAIRO_OPERATOR_DARKEN OperatorLighten Operator = C.CAIRO_OPERATOR_LIGHTEN OperatorColorDodge Operator = C.CAIRO_OPERATOR_COLOR_DODGE OperatorColorBurn Operator = C.CAIRO_OPERATOR_COLOR_BURN OperatorHardLight Operator = C.CAIRO_OPERATOR_HARD_LIGHT OperatorSoftLight Operator = C.CAIRO_OPERATOR_SOFT_LIGHT OperatorDifference Operator = C.CAIRO_OPERATOR_DIFFERENCE OperatorExclusion Operator = C.CAIRO_OPERATOR_EXCLUSION OperatorHslHue Operator = C.CAIRO_OPERATOR_HSL_HUE OperatorHslSaturation Operator = C.CAIRO_OPERATOR_HSL_SATURATION OperatorHslColor Operator = C.CAIRO_OPERATOR_HSL_COLOR OperatorHslLuminosity Operator = C.CAIRO_OPERATOR_HSL_LUMINOSITY )
String implements the Stringer interface, which is used in places like fmt's %q. For all enums like this it returns the Go name of the constant.
See cairo_path_t.
C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-path-t
Construct a Path from a C cairo_path_t* found from some exernal source. It is the caller's responsibility to ensure the pointer lives.
Wrap a C cairo_path_t* found from some external source as a *Path. The Go side will destroy the reference when it's no longer used.
PathIter creates an iterator over the segments within the path.
See cairo_path_data_type_t.
C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-path-data-type-t
const ( PathMoveTo PathDataType = C.CAIRO_PATH_MOVE_TO PathLineTo PathDataType = C.CAIRO_PATH_LINE_TO PathCurveTo PathDataType = C.CAIRO_PATH_CURVE_TO PathClosePath PathDataType = C.CAIRO_PATH_CLOSE_PATH )
func (i PathDataType) String() string
String implements the Stringer interface, which is used in places like fmt's %q. For all enums like this it returns the Go name of the constant.
type PathIter struct {
// contains filtered or unexported fields
}
PathIter iterates a Path.
func (pi *PathIter) Next() *PathSegment
Next returns the next PathSegment, or returns nil at the end of the path.
PathPoints are produced by iterating paths.
type PathSegment struct { Type PathDataType Points []PathPoint }
PathSegments are produced by iterating paths.
See cairo_pattern_t.
C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-t
Construct a Pattern from a C cairo_pattern_t* found from some exernal source. It is the caller's responsibility to ensure the pointer lives.
See cairo_pattern_create_for_surface().
C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-create-for-surface
See cairo_pattern_create_linear().
C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-create-linear
See cairo_pattern_create_mesh().
C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-create-mesh
See cairo_pattern_create_rgb().
C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-create-rgb
See cairo_pattern_create_rgba().
C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-create-rgba
See cairo_pattern_create_radial().
C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-create-radial
Wrap a C cairo_pattern_t* found from some external source as a *Pattern. The Go side will destroy the reference when it's no longer used.
See cairo_pattern_add_color_stop_rgb().
C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-add-color-stop-rgb
See cairo_pattern_add_color_stop_rgba().
C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-add-color-stop-rgba
See cairo_pattern_get_extend().
C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-get-extend
See cairo_pattern_get_filter().
C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-get-filter
See cairo_pattern_get_matrix().
C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-get-matrix
func (pattern *Pattern) GetType() PatternType
See cairo_pattern_get_type().
C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-get-type
See cairo_pattern_set_extend().
C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-set-extend
See cairo_pattern_set_filter().
C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-set-filter
See cairo_pattern_set_matrix().
C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-set-matrix
See cairo_pattern_type_t.
C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-type-t
const ( PatternTypeSolid PatternType = C.CAIRO_PATTERN_TYPE_SOLID PatternTypeSurface PatternType = C.CAIRO_PATTERN_TYPE_SURFACE PatternTypeLinear PatternType = C.CAIRO_PATTERN_TYPE_LINEAR PatternTypeRadial PatternType = C.CAIRO_PATTERN_TYPE_RADIAL PatternTypeMesh PatternType = C.CAIRO_PATTERN_TYPE_MESH PatternTypeRasterSource PatternType = C.CAIRO_PATTERN_TYPE_RASTER_SOURCE )
func (i PatternType) String() string
String implements the Stringer interface, which is used in places like fmt's %q. For all enums like this it returns the Go name of the constant.
func RecordingSurfaceCreate(content Content, extents *Rectangle) *RecordingSurface
See cairo_recording_surface_create().
C API documentation: http://cairographics.org/manual/cairo-Recording-Surfaces.html#cairo-recording-surface-create
func (surface *RecordingSurface) GetExtents(extents *Rectangle) bool
See cairo_recording_surface_get_extents().
C API documentation: http://cairographics.org/manual/cairo-Recording-Surfaces.html#cairo-recording-surface-get-extents
See cairo_recording_surface_ink_extents().
C API documentation: http://cairographics.org/manual/cairo-Recording-Surfaces.html#cairo-recording-surface-ink-extents
See cairo_rectangle_t.
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-rectangle-t
See cairo_region_t.
C API documentation: http://cairographics.org/manual/cairo-Regions.html#cairo-region-t
Construct a Region from a C cairo_region_t* found from some exernal source. It is the caller's responsibility to ensure the pointer lives.
See cairo_region_create().
C API documentation: http://cairographics.org/manual/cairo-Regions.html#cairo-region-create
Wrap a C cairo_region_t* found from some external source as a *Region. The Go side will destroy the reference when it's no longer used.
See cairo_region_contains_point().
C API documentation: http://cairographics.org/manual/cairo-Regions.html#cairo-region-contains-point
See cairo_region_copy().
C API documentation: http://cairographics.org/manual/cairo-Regions.html#cairo-region-copy
See cairo_region_equal().
C API documentation: http://cairographics.org/manual/cairo-Regions.html#cairo-region-equal
See cairo_region_intersect().
C API documentation: http://cairographics.org/manual/cairo-Regions.html#cairo-region-intersect
See cairo_region_is_empty().
C API documentation: http://cairographics.org/manual/cairo-Regions.html#cairo-region-is-empty
See cairo_region_num_rectangles().
C API documentation: http://cairographics.org/manual/cairo-Regions.html#cairo-region-num-rectangles
See cairo_region_subtract().
C API documentation: http://cairographics.org/manual/cairo-Regions.html#cairo-region-subtract
See cairo_region_translate().
C API documentation: http://cairographics.org/manual/cairo-Regions.html#cairo-region-translate
See cairo_region_union().
C API documentation: http://cairographics.org/manual/cairo-Regions.html#cairo-region-union
See cairo_region_xor().
C API documentation: http://cairographics.org/manual/cairo-Regions.html#cairo-region-xor
See cairo_region_overlap_t.
C API documentation: http://cairographics.org/manual/cairo-Regions.html#cairo-region-overlap-t
const ( RegionOverlapIn RegionOverlap = C.CAIRO_REGION_OVERLAP_IN RegionOverlapOut RegionOverlap = C.CAIRO_REGION_OVERLAP_OUT RegionOverlapPart RegionOverlap = C.CAIRO_REGION_OVERLAP_PART )
func (i RegionOverlap) String() string
String implements the Stringer interface, which is used in places like fmt's %q. For all enums like this it returns the Go name of the constant.
func SVGSurfaceCreate(filename string, widthInPoints, heightInPoints float64) *SVGSurface
See cairo_svg_surface_create().
C API documentation: http://cairographics.org/manual/cairo-SVG-Surfaces.html#cairo-svg-surface-create
func (surface *SVGSurface) RestrictToVersion(version SVGVersion)
See cairo_svg_surface_restrict_to_version().
C API documentation: http://cairographics.org/manual/cairo-SVG-Surfaces.html#cairo-svg-surface-restrict-to-version
See cairo_svg_version_t.
C API documentation: http://cairographics.org/manual/cairo-SVG-Surfaces.html#cairo-svg-version-t
const ( SVGVersion11 SVGVersion = C.CAIRO_SVG_VERSION_1_1 SVGVersion12 SVGVersion = C.CAIRO_SVG_VERSION_1_2 )
func SVGGetVersions() []SVGVersion
See cairo_svg_get_versions().
C API documentation: http://cairographics.org/manual/cairo-SVG-Surfaces.html#cairo-svg-get-versions
func (i SVGVersion) String() string
String implements the Stringer interface, which is used in places like fmt's %q. For all enums like this it returns the Go name of the constant.
func (version SVGVersion) ToString() string
See cairo_svg_version_to_string().
C API documentation: http://cairographics.org/manual/cairo-SVG-Surfaces.html#cairo-svg-version-to-string
See cairo_scaled_font_t.
C API documentation: http://cairographics.org/manual/cairo-cairo-scaled-font-t.html#cairo-scaled-font-t
func BorrowScaledFont(p unsafe.Pointer) *ScaledFont
Construct a ScaledFont from a C cairo_scaled_font_t* found from some exernal source. It is the caller's responsibility to ensure the pointer lives.
func ScaledFontCreate(fontFace *FontFace, fontMatrix, ctm *Matrix, options *FontOptions) *ScaledFont
See cairo_scaled_font_create().
C API documentation: http://cairographics.org/manual/cairo-cairo-scaled-font-t.html#cairo-scaled-font-create
func WrapScaledFont(p unsafe.Pointer) *ScaledFont
Wrap a C cairo_scaled_font_t* found from some external source as a *ScaledFont. The Go side will destroy the reference when it's no longer used.
func (scaledFont *ScaledFont) Extents(extents *FontExtents)
See cairo_scaled_font_extents().
C API documentation: http://cairographics.org/manual/cairo-cairo-scaled-font-t.html#cairo-scaled-font-extents
func (scaledFont *ScaledFont) GetCTM(ctm *Matrix)
See cairo_scaled_font_get_ctm().
C API documentation: http://cairographics.org/manual/cairo-cairo-scaled-font-t.html#cairo-scaled-font-get-ctm
func (scaledFont *ScaledFont) GetFontFace() *FontFace
See cairo_scaled_font_get_font_face().
C API documentation: http://cairographics.org/manual/cairo-cairo-scaled-font-t.html#cairo-scaled-font-get-font-face
func (scaledFont *ScaledFont) GetFontMatrix(fontMatrix *Matrix)
See cairo_scaled_font_get_font_matrix().
C API documentation: http://cairographics.org/manual/cairo-cairo-scaled-font-t.html#cairo-scaled-font-get-font-matrix
func (scaledFont *ScaledFont) GetFontOptions(options *FontOptions)
See cairo_scaled_font_get_font_options().
C API documentation: http://cairographics.org/manual/cairo-cairo-scaled-font-t.html#cairo-scaled-font-get-font-options
func (scaledFont *ScaledFont) GetScaleMatrix(scaleMatrix *Matrix)
See cairo_scaled_font_get_scale_matrix().
C API documentation: http://cairographics.org/manual/cairo-cairo-scaled-font-t.html#cairo-scaled-font-get-scale-matrix
func (scaledFont *ScaledFont) GetType() FontType
See cairo_scaled_font_get_type().
C API documentation: http://cairographics.org/manual/cairo-cairo-scaled-font-t.html#cairo-scaled-font-get-type
func (scaledFont *ScaledFont) GlyphExtents(glyphs []Glyph, extents *TextExtents)
See cairo_scaled_font_glyph_extents().
C API documentation: http://cairographics.org/manual/cairo-cairo-scaled-font-t.html#cairo-scaled-font-glyph-extents
func (scaledFont *ScaledFont) TextExtents(utf8 string, extents *TextExtents)
See cairo_scaled_font_text_extents().
C API documentation: http://cairographics.org/manual/cairo-cairo-scaled-font-t.html#cairo-scaled-font-text-extents
See cairo_status_t.
C API documentation: http://cairographics.org/manual/cairo-Error-handling.html#cairo-status-t
const ( StatusSuccess Status = C.CAIRO_STATUS_SUCCESS StatusNoMemory Status = C.CAIRO_STATUS_NO_MEMORY StatusInvalidRestore Status = C.CAIRO_STATUS_INVALID_RESTORE StatusInvalidPopGroup Status = C.CAIRO_STATUS_INVALID_POP_GROUP StatusNoCurrentPoint Status = C.CAIRO_STATUS_NO_CURRENT_POINT StatusInvalidMatrix Status = C.CAIRO_STATUS_INVALID_MATRIX StatusInvalidStatus Status = C.CAIRO_STATUS_INVALID_STATUS StatusNullPointer Status = C.CAIRO_STATUS_NULL_POINTER StatusInvalidString Status = C.CAIRO_STATUS_INVALID_STRING StatusInvalidPathData Status = C.CAIRO_STATUS_INVALID_PATH_DATA StatusReadError Status = C.CAIRO_STATUS_READ_ERROR StatusWriteError Status = C.CAIRO_STATUS_WRITE_ERROR StatusSurfaceFinished Status = C.CAIRO_STATUS_SURFACE_FINISHED StatusSurfaceTypeMismatch Status = C.CAIRO_STATUS_SURFACE_TYPE_MISMATCH StatusPatternTypeMismatch Status = C.CAIRO_STATUS_PATTERN_TYPE_MISMATCH StatusInvalidContent Status = C.CAIRO_STATUS_INVALID_CONTENT StatusInvalidFormat Status = C.CAIRO_STATUS_INVALID_FORMAT StatusInvalidVisual Status = C.CAIRO_STATUS_INVALID_VISUAL StatusFileNotFound Status = C.CAIRO_STATUS_FILE_NOT_FOUND StatusInvalidDash Status = C.CAIRO_STATUS_INVALID_DASH StatusInvalidDscComment Status = C.CAIRO_STATUS_INVALID_DSC_COMMENT StatusInvalidIndex Status = C.CAIRO_STATUS_INVALID_INDEX StatusClipNotRepresentable Status = C.CAIRO_STATUS_CLIP_NOT_REPRESENTABLE StatusTempFileError Status = C.CAIRO_STATUS_TEMP_FILE_ERROR StatusInvalidStride Status = C.CAIRO_STATUS_INVALID_STRIDE StatusFontTypeMismatch Status = C.CAIRO_STATUS_FONT_TYPE_MISMATCH StatusUserFontImmutable Status = C.CAIRO_STATUS_USER_FONT_IMMUTABLE StatusUserFontError Status = C.CAIRO_STATUS_USER_FONT_ERROR StatusNegativeCount Status = C.CAIRO_STATUS_NEGATIVE_COUNT StatusInvalidClusters Status = C.CAIRO_STATUS_INVALID_CLUSTERS StatusInvalidSlant Status = C.CAIRO_STATUS_INVALID_SLANT StatusInvalidWeight Status = C.CAIRO_STATUS_INVALID_WEIGHT StatusInvalidSize Status = C.CAIRO_STATUS_INVALID_SIZE StatusUserFontNotImplemented Status = C.CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED StatusDeviceTypeMismatch Status = C.CAIRO_STATUS_DEVICE_TYPE_MISMATCH StatusDeviceError Status = C.CAIRO_STATUS_DEVICE_ERROR StatusInvalidMeshConstruction Status = C.CAIRO_STATUS_INVALID_MESH_CONSTRUCTION StatusDeviceFinished Status = C.CAIRO_STATUS_DEVICE_FINISHED StatusJbig2GlobalMissing Status = C.CAIRO_STATUS_JBIG2_GLOBAL_MISSING StatusLastStatus Status = C.CAIRO_STATUS_LAST_STATUS )
Error implements the error interface.
See cairo_subpixel_order_t.
C API documentation: http://cairographics.org/manual/cairo-cairo-font-options-t.html#cairo-subpixel-order-t
const ( SubpixelOrderDefault SubpixelOrder = C.CAIRO_SUBPIXEL_ORDER_DEFAULT SubpixelOrderRGB SubpixelOrder = C.CAIRO_SUBPIXEL_ORDER_RGB SubpixelOrderBGR SubpixelOrder = C.CAIRO_SUBPIXEL_ORDER_BGR SubpixelOrderVRGB SubpixelOrder = C.CAIRO_SUBPIXEL_ORDER_VRGB SubpixelOrderVBGR SubpixelOrder = C.CAIRO_SUBPIXEL_ORDER_VBGR )
func (i SubpixelOrder) String() string
String implements the Stringer interface, which is used in places like fmt's %q. For all enums like this it returns the Go name of the constant.
See cairo_surface_t.
C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-t
Construct a Surface from a C cairo_surface_t* found from some exernal source. It is the caller's responsibility to ensure the pointer lives.
Wrap a C cairo_surface_t* found from some external source as a *Surface. The Go side will destroy the reference when it's no longer used.
See cairo_surface_copy_page().
C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-copy-page
See cairo_surface_create_for_rectangle().
C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-create-for-rectangle
func (target *Surface) CreateObserver(mode SurfaceObserverMode) *SurfaceObserver
See cairo_surface_create_observer().
See cairo_surface_create_similar().
C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-create-similar
See cairo_surface_create_similar_image().
C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-create-similar-image
See cairo_surface_finish().
C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-finish
See cairo_surface_flush().
C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-flush
See cairo_surface_get_content().
C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-get-content
See cairo_surface_get_device().
C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-get-device
See cairo_surface_get_device_offset().
C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-get-device-offset
See cairo_surface_get_device_scale().
C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-get-device-scale
See cairo_surface_get_fallback_resolution().
C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-get-fallback-resolution
func (surface *Surface) GetFontOptions(options *FontOptions)
See cairo_surface_get_font_options().
C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-get-font-options
func (surface *Surface) GetType() SurfaceType
See cairo_surface_get_type().
C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-get-type
See cairo_surface_has_show_text_glyphs().
C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-has-show-text-glyphs
See cairo_surface_mark_dirty().
C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-mark-dirty
See cairo_surface_mark_dirty_rectangle().
C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-mark-dirty-rectangle
See cairo_surface_set_device_offset().
C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-set-device-offset
See cairo_surface_set_device_scale().
C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-set-device-scale
See cairo_surface_set_fallback_resolution().
C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-set-fallback-resolution
See cairo_surface_show_page().
C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-show-page
See cairo_surface_supports_mime_type().
C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-supports-mime-type
See cairo_surface_unmap_image().
C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-unmap-image
WriteToPNG encodes a Surface to an io.Writer as a PNG file.
func (surface *SurfaceObserver) Elapsed() float64
See cairo_surface_observer_elapsed().
See cairo_surface_observer_mode_t.
const ( SurfaceObserverNormal SurfaceObserverMode = C.CAIRO_SURFACE_OBSERVER_NORMAL SurfaceObserverRecordOperations SurfaceObserverMode = C.CAIRO_SURFACE_OBSERVER_RECORD_OPERATIONS )
func (i SurfaceObserverMode) String() string
String implements the Stringer interface, which is used in places like fmt's %q. For all enums like this it returns the Go name of the constant.
See cairo_surface_type_t.
C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-type-t
const ( SurfaceTypeImage SurfaceType = C.CAIRO_SURFACE_TYPE_IMAGE SurfaceTypePDF SurfaceType = C.CAIRO_SURFACE_TYPE_PDF SurfaceTypePS SurfaceType = C.CAIRO_SURFACE_TYPE_PS SurfaceTypeXlib SurfaceType = C.CAIRO_SURFACE_TYPE_XLIB SurfaceTypeXCB SurfaceType = C.CAIRO_SURFACE_TYPE_XCB SurfaceTypeGlitz SurfaceType = C.CAIRO_SURFACE_TYPE_GLITZ SurfaceTypeQuartz SurfaceType = C.CAIRO_SURFACE_TYPE_QUARTZ SurfaceTypeWin32 SurfaceType = C.CAIRO_SURFACE_TYPE_WIN32 SurfaceTypeBeos SurfaceType = C.CAIRO_SURFACE_TYPE_BEOS SurfaceTypeDirectfb SurfaceType = C.CAIRO_SURFACE_TYPE_DIRECTFB SurfaceTypeSVG SurfaceType = C.CAIRO_SURFACE_TYPE_SVG SurfaceTypeOS2 SurfaceType = C.CAIRO_SURFACE_TYPE_OS2 SurfaceTypeWin32Printing SurfaceType = C.CAIRO_SURFACE_TYPE_WIN32_PRINTING SurfaceTypeQuartzImage SurfaceType = C.CAIRO_SURFACE_TYPE_QUARTZ_IMAGE SurfaceTypeScript SurfaceType = C.CAIRO_SURFACE_TYPE_SCRIPT SurfaceTypeQt SurfaceType = C.CAIRO_SURFACE_TYPE_QT SurfaceTypeRecording SurfaceType = C.CAIRO_SURFACE_TYPE_RECORDING SurfaceTypeVG SurfaceType = C.CAIRO_SURFACE_TYPE_VG SurfaceTypeGL SurfaceType = C.CAIRO_SURFACE_TYPE_GL SurfaceTypeDRM SurfaceType = C.CAIRO_SURFACE_TYPE_DRM SurfaceTypeTee SurfaceType = C.CAIRO_SURFACE_TYPE_TEE SurfaceTypeXML SurfaceType = C.CAIRO_SURFACE_TYPE_XML SurfaceTypeSkia SurfaceType = C.CAIRO_SURFACE_TYPE_SKIA SurfaceTypeSubsurface SurfaceType = C.CAIRO_SURFACE_TYPE_SUBSURFACE SurfaceTypeCOGL SurfaceType = C.CAIRO_SURFACE_TYPE_COGL )
func (i SurfaceType) String() string
String implements the Stringer interface, which is used in places like fmt's %q. For all enums like this it returns the Go name of the constant.
See cairo_text_cluster_flags_t.
C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-text-cluster-flags-t
const ( TextClusterFlagBackward TextClusterFlags = C.CAIRO_TEXT_CLUSTER_FLAG_BACKWARD )
func (i TextClusterFlags) String() string
String implements the Stringer interface, which is used in places like fmt's %q. For all enums like this it returns the Go name of the constant.
type TextExtents struct { XBearing float64 YBearing float64 Width float64 Height float64 XAdvance float64 YAdvance float64 }
See cairo_text_extents_t.
C API documentation: http://cairographics.org/manual/cairo-cairo-scaled-font-t.html#cairo-text-extents-t
func ToyFontFaceCreate(family string, slant FontSlant, weight FontWeight) *ToyFontFace
See cairo_toy_font_face_create().
C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-toy-font-face-create
func (fontFace *ToyFontFace) GetFamily() string
See cairo_toy_font_face_get_family().
C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-toy-font-face-get-family
func (fontFace *ToyFontFace) GetSlant() FontSlant
See cairo_toy_font_face_get_slant().
C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-toy-font-face-get-slant
func (fontFace *ToyFontFace) GetWeight() FontWeight
See cairo_toy_font_face_get_weight().
C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-toy-font-face-get-weight
func (device *XlibDevice) DebugCapXrenderVersion(majorVersion, minorVersion int)
See cairo_xlib_device_debug_cap_xrender_version().
C API documentation: http://cairographics.org/manual/cairo-XLib-Surfaces.html#cairo-xlib-device-debug-cap-xrender-version
func (device *XlibDevice) DebugGetPrecision() int
See cairo_xlib_device_debug_get_precision().
C API documentation: http://cairographics.org/manual/cairo-XLib-Surfaces.html#cairo-xlib-device-debug-get-precision
func (device *XlibDevice) DebugSetPrecision(precision int)
See cairo_xlib_device_debug_set_precision().
C API documentation: http://cairographics.org/manual/cairo-XLib-Surfaces.html#cairo-xlib-device-debug-set-precision
func XlibSurfaceCreate(dpy unsafe.Pointer, drawable uint64, visual unsafe.Pointer, width, height int) *XlibSurface
See cairo_xlib_surface_create().
C API documentation: http://cairographics.org/manual/cairo-XLib-Surfaces.html#cairo-xlib-surface-create
func XlibSurfaceCreateForBitmap(dpy unsafe.Pointer, bitmap uint64, screen unsafe.Pointer, width, height int) *XlibSurface
See cairo_xlib_surface_create_for_bitmap().
C API documentation: http://cairographics.org/manual/cairo-XLib-Surfaces.html#cairo-xlib-surface-create-for-bitmap
func (surface *XlibSurface) GetDepth() int
See cairo_xlib_surface_get_depth().
C API documentation: http://cairographics.org/manual/cairo-XLib-Surfaces.html#cairo-xlib-surface-get-depth
func (surface *XlibSurface) GetDisplay() unsafe.Pointer
See cairo_xlib_surface_get_display().
C API documentation: http://cairographics.org/manual/cairo-XLib-Surfaces.html#cairo-xlib-surface-get-display
func (surface *XlibSurface) GetDrawable() uint64
See cairo_xlib_surface_get_drawable().
C API documentation: http://cairographics.org/manual/cairo-XLib-Surfaces.html#cairo-xlib-surface-get-drawable
func (surface *XlibSurface) GetHeight() int
See cairo_xlib_surface_get_height().
C API documentation: http://cairographics.org/manual/cairo-XLib-Surfaces.html#cairo-xlib-surface-get-height
func (surface *XlibSurface) GetScreen() unsafe.Pointer
See cairo_xlib_surface_get_screen().
C API documentation: http://cairographics.org/manual/cairo-XLib-Surfaces.html#cairo-xlib-surface-get-screen
func (surface *XlibSurface) GetVisual() unsafe.Pointer
See cairo_xlib_surface_get_visual().
C API documentation: http://cairographics.org/manual/cairo-XLib-Surfaces.html#cairo-xlib-surface-get-visual
func (surface *XlibSurface) GetWidth() int
See cairo_xlib_surface_get_width().
C API documentation: http://cairographics.org/manual/cairo-XLib-Surfaces.html#cairo-xlib-surface-get-width
func (surface *XlibSurface) SetDrawable(drawable uint64, width, height int)
See cairo_xlib_surface_set_drawable().
C API documentation: http://cairographics.org/manual/cairo-XLib-Surfaces.html#cairo-xlib-surface-set-drawable
func (surface *XlibSurface) SetSize(width, height int)
See cairo_xlib_surface_set_size().
C API documentation: http://cairographics.org/manual/cairo-XLib-Surfaces.html#cairo-xlib-surface-set-size
Package cairo imports 7 packages (graph) and is imported by 4 packages. Updated 2018-02-18. Refresh now. Tools for package owners.