cairo

package
v0.0.0-...-ddd30f8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2016 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Overview

Package cairo wraps the Cairo graphics library.

http://cairographics.org/

Most functions are one-to-one with the corresponding Cairo functions. See the C documentation at http://cairographics.org/manual/ for details.

Subtyping

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).

Error Handling

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.)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Version

func Version() int

See cairo_version().

C API documentation: http://cairographics.org/manual/cairo-Version-Information.html#cairo-version

func VersionString

func VersionString() string

See cairo_version_string().

C API documentation: http://cairographics.org/manual/cairo-Version-Information.html#cairo-version-string

Types

type Antialias

type Antialias int

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
)

func (Antialias) String

func (i Antialias) 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 Content

type Content int

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
)

func (Content) String

func (i Content) 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 Context

type Context struct {
	Ptr *C.cairo_t
}

See cairo_t.

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-t

func BorrowContext

func BorrowContext(p unsafe.Pointer) *Context

Construct a Context from a C cairo_t* found from some exernal source. It is the caller's responsibility to ensure the pointer lives.

func Create

func Create(target *Surface) *Context

See cairo_create().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-create

func WrapContext

func WrapContext(p unsafe.Pointer) *Context

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.

func (*Context) AppendPath

func (cr *Context) AppendPath(path *Path)

See cairo_append_path().

C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-append-path

func (*Context) Arc

func (cr *Context) Arc(xc, yc, radius, angle1, angle2 float64)

See cairo_arc().

C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-arc

func (*Context) ArcNegative

func (cr *Context) ArcNegative(xc, yc, radius, angle1, angle2 float64)

See cairo_arc_negative().

C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-arc-negative

func (*Context) Clip

func (cr *Context) Clip()

See cairo_clip().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-clip

func (*Context) ClipExtents

func (cr *Context) ClipExtents() (float64, float64, float64, float64)

See cairo_clip_extents().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-clip-extents

func (*Context) ClipPreserve

func (cr *Context) ClipPreserve()

See cairo_clip_preserve().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-clip-preserve

func (*Context) ClosePath

func (cr *Context) ClosePath()

See cairo_close_path().

C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-close-path

func (*Context) CopyPage

func (cr *Context) CopyPage()

See cairo_copy_page().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-copy-page

func (*Context) CopyPath

func (cr *Context) CopyPath() *Path

See cairo_copy_path().

C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-copy-path

func (*Context) CopyPathFlat

func (cr *Context) CopyPathFlat() *Path

See cairo_copy_path_flat().

C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-copy-path-flat

func (*Context) CurveTo

func (cr *Context) CurveTo(x1, y1, x2, y2, x3, y3 float64)

See cairo_curve_to().

C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-curve-to

func (*Context) DeviceToUser

func (cr *Context) DeviceToUser(x, y *float64)

See cairo_device_to_user().

C API documentation: http://cairographics.org/manual/cairo-Transformations.html#cairo-device-to-user

func (*Context) DeviceToUserDistance

func (cr *Context) DeviceToUserDistance(dx, dy *float64)

See cairo_device_to_user_distance().

C API documentation: http://cairographics.org/manual/cairo-Transformations.html#cairo-device-to-user-distance

func (*Context) Fill

func (cr *Context) Fill()

See cairo_fill().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-fill

func (*Context) FillExtents

func (cr *Context) FillExtents() (float64, float64, float64, float64)

See cairo_fill_extents().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-fill-extents

func (*Context) FillPreserve

func (cr *Context) FillPreserve()

See cairo_fill_preserve().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-fill-preserve

func (*Context) FontExtents

func (cr *Context) FontExtents(extents *FontExtents)

See cairo_font_extents().

C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-font-extents

func (*Context) GetAntialias

func (cr *Context) GetAntialias() Antialias

See cairo_get_antialias().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-antialias

func (*Context) GetCurrentPoint

func (cr *Context) GetCurrentPoint() (float64, float64)

See cairo_get_current_point().

C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-get-current-point

func (*Context) GetDash

func (cr *Context) GetDash(dashes, offset *float64)

See cairo_get_dash().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-dash

func (*Context) GetDashCount

func (cr *Context) GetDashCount() int

See cairo_get_dash_count().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-dash-count

func (*Context) GetFillRule

func (cr *Context) GetFillRule() FillRule

See cairo_get_fill_rule().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-fill-rule

func (*Context) GetFontFace

func (cr *Context) GetFontFace() *FontFace

See cairo_get_font_face().

C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-get-font-face

func (*Context) GetFontMatrix

func (cr *Context) GetFontMatrix(matrix *Matrix)

See cairo_get_font_matrix().

C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-get-font-matrix

func (*Context) GetFontOptions

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

func (*Context) GetGroupTarget

func (cr *Context) GetGroupTarget() *Surface

See cairo_get_group_target().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-group-target

func (*Context) GetLineCap

func (cr *Context) GetLineCap() LineCap

See cairo_get_line_cap().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-line-cap

func (*Context) GetLineJoin

func (cr *Context) GetLineJoin() LineJoin

See cairo_get_line_join().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-line-join

func (*Context) GetLineWidth

func (cr *Context) GetLineWidth() float64

See cairo_get_line_width().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-line-width

func (*Context) GetMatrix

func (cr *Context) GetMatrix(matrix *Matrix)

See cairo_get_matrix().

C API documentation: http://cairographics.org/manual/cairo-Transformations.html#cairo-get-matrix

func (*Context) GetMiterLimit

func (cr *Context) GetMiterLimit() float64

See cairo_get_miter_limit().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-miter-limit

func (*Context) GetOperator

func (cr *Context) GetOperator() Operator

See cairo_get_operator().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-operator

func (*Context) GetScaledFont

func (cr *Context) GetScaledFont() *ScaledFont

See cairo_get_scaled_font().

C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-get-scaled-font

func (*Context) GetSource

func (cr *Context) GetSource() *Pattern

See cairo_get_source().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-source

func (*Context) GetTarget

func (cr *Context) GetTarget() *Surface

See cairo_get_target().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-target

func (*Context) GetTolerance

func (cr *Context) GetTolerance() float64

See cairo_get_tolerance().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-tolerance

func (*Context) GlyphExtents

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

func (*Context) GlyphPath

func (cr *Context) GlyphPath(glyphs []Glyph)

See cairo_glyph_path().

C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-glyph-path

func (*Context) HasCurrentPoint

func (cr *Context) HasCurrentPoint() bool

See cairo_has_current_point().

C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-has-current-point

func (*Context) IdentityMatrix

func (cr *Context) IdentityMatrix()

See cairo_identity_matrix().

C API documentation: http://cairographics.org/manual/cairo-Transformations.html#cairo-identity-matrix

func (*Context) InClip

func (cr *Context) InClip(x, y float64) bool

See cairo_in_clip().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-in-clip

func (*Context) InFill

func (cr *Context) InFill(x, y float64) bool

See cairo_in_fill().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-in-fill

func (*Context) InStroke

func (cr *Context) InStroke(x, y float64) bool

See cairo_in_stroke().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-in-stroke

func (*Context) LineTo

func (cr *Context) LineTo(x, y float64)

See cairo_line_to().

C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-line-to

func (*Context) Mask

func (cr *Context) Mask(pattern *Pattern)

See cairo_mask().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-mask

func (*Context) MaskSurface

func (cr *Context) MaskSurface(surface *Surface, surfaceX, surfaceY float64)

See cairo_mask_surface().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-mask-surface

func (*Context) MoveTo

func (cr *Context) MoveTo(x, y float64)

See cairo_move_to().

C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-move-to

func (*Context) NewPath

func (cr *Context) NewPath()

See cairo_new_path().

C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-new-path

func (*Context) NewSubPath

func (cr *Context) NewSubPath()

See cairo_new_sub_path().

C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-new-sub-path

func (*Context) Paint

func (cr *Context) Paint()

See cairo_paint().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-paint

func (*Context) PaintWithAlpha

func (cr *Context) PaintWithAlpha(alpha float64)

See cairo_paint_with_alpha().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-paint-with-alpha

func (*Context) PathExtents

func (cr *Context) PathExtents() (float64, float64, float64, float64)

See cairo_path_extents().

C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-path-extents

func (*Context) PopGroup

func (cr *Context) PopGroup() *Pattern

See cairo_pop_group().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-pop-group

func (*Context) PopGroupToSource

func (cr *Context) PopGroupToSource()

See cairo_pop_group_to_source().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-pop-group-to-source

func (*Context) PushGroup

func (cr *Context) PushGroup()

See cairo_push_group().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-push-group

func (*Context) PushGroupWithContent

func (cr *Context) PushGroupWithContent(content Content)

See cairo_push_group_with_content().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-push-group-with-content

func (*Context) Rectangle

func (cr *Context) Rectangle(x, y, width, height float64)

See cairo_rectangle().

C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-rectangle

func (*Context) RelCurveTo

func (cr *Context) RelCurveTo(dx1, dy1, dx2, dy2, dx3, dy3 float64)

See cairo_rel_curve_to().

C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-rel-curve-to

func (*Context) RelLineTo

func (cr *Context) RelLineTo(dx, dy float64)

See cairo_rel_line_to().

C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-rel-line-to

func (*Context) RelMoveTo

func (cr *Context) RelMoveTo(dx, dy float64)

See cairo_rel_move_to().

C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-rel-move-to

func (*Context) ResetClip

func (cr *Context) ResetClip()

See cairo_reset_clip().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-reset-clip

func (*Context) Restore

func (cr *Context) Restore()

See cairo_restore().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-restore

func (*Context) Rotate

func (cr *Context) Rotate(angle float64)

See cairo_rotate().

C API documentation: http://cairographics.org/manual/cairo-Transformations.html#cairo-rotate

func (*Context) Save

func (cr *Context) Save()

See cairo_save().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-save

func (*Context) Scale

func (cr *Context) Scale(sx, sy float64)

See cairo_scale().

C API documentation: http://cairographics.org/manual/cairo-Transformations.html#cairo-scale

func (*Context) SelectFontFace

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

func (*Context) SetAntialias

func (cr *Context) SetAntialias(antialias Antialias)

See cairo_set_antialias().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-antialias

func (*Context) SetDash

func (cr *Context) SetDash(dashes []float64, offset float64)

See cairo_set_dash().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-dash

func (*Context) SetFillRule

func (cr *Context) SetFillRule(fillRule FillRule)

See cairo_set_fill_rule().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-fill-rule

func (*Context) SetFontFace

func (cr *Context) SetFontFace(fontFace *FontFace)

See cairo_set_font_face().

C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-set-font-face

func (*Context) SetFontMatrix

func (cr *Context) SetFontMatrix(matrix *Matrix)

See cairo_set_font_matrix().

C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-set-font-matrix

func (*Context) SetFontOptions

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

func (*Context) SetFontSize

func (cr *Context) SetFontSize(size float64)

See cairo_set_font_size().

C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-set-font-size

func (*Context) SetLineCap

func (cr *Context) SetLineCap(lineCap LineCap)

See cairo_set_line_cap().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-line-cap

func (*Context) SetLineJoin

func (cr *Context) SetLineJoin(lineJoin LineJoin)

See cairo_set_line_join().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-line-join

func (*Context) SetLineWidth

func (cr *Context) SetLineWidth(width float64)

See cairo_set_line_width().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-line-width

func (*Context) SetMatrix

func (cr *Context) SetMatrix(matrix *Matrix)

See cairo_set_matrix().

C API documentation: http://cairographics.org/manual/cairo-Transformations.html#cairo-set-matrix

func (*Context) SetMiterLimit

func (cr *Context) SetMiterLimit(limit float64)

See cairo_set_miter_limit().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-miter-limit

func (*Context) SetOperator

func (cr *Context) SetOperator(op Operator)

See cairo_set_operator().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-operator

func (*Context) SetScaledFont

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

func (*Context) SetSource

func (cr *Context) SetSource(source *Pattern)

See cairo_set_source().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-source

func (*Context) SetSourceRGB

func (cr *Context) SetSourceRGB(red, green, blue float64)

See cairo_set_source_rgb().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-source-rgb

func (*Context) SetSourceRGBA

func (cr *Context) SetSourceRGBA(red, green, blue, alpha float64)

See cairo_set_source_rgba().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-source-rgba

func (*Context) SetSourceSurface

func (cr *Context) SetSourceSurface(surface *Surface, x, y float64)

See cairo_set_source_surface().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-source-surface

func (*Context) SetTolerance

func (cr *Context) SetTolerance(tolerance float64)

See cairo_set_tolerance().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-tolerance

func (*Context) ShowGlyphs

func (cr *Context) ShowGlyphs(glyphs []Glyph)

See cairo_show_glyphs().

C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-show-glyphs

func (*Context) ShowPage

func (cr *Context) ShowPage()

See cairo_show_page().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-show-page

func (*Context) ShowText

func (cr *Context) ShowText(utf8 string)

See cairo_show_text().

C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-show-text

func (*Context) Stroke

func (cr *Context) Stroke()

See cairo_stroke().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-stroke

func (*Context) StrokeExtents

func (cr *Context) StrokeExtents() (float64, float64, float64, float64)

See cairo_stroke_extents().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-stroke-extents

func (*Context) StrokePreserve

func (cr *Context) StrokePreserve()

See cairo_stroke_preserve().

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-stroke-preserve

func (*Context) TextExtents

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

func (*Context) TextPath

func (cr *Context) TextPath(utf8 string)

See cairo_text_path().

C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-text-path

func (*Context) Transform

func (cr *Context) Transform(matrix *Matrix)

See cairo_transform().

C API documentation: http://cairographics.org/manual/cairo-Transformations.html#cairo-transform

func (*Context) Translate

func (cr *Context) Translate(tx, ty float64)

See cairo_translate().

C API documentation: http://cairographics.org/manual/cairo-Transformations.html#cairo-translate

func (*Context) UserToDevice

func (cr *Context) UserToDevice(x, y *float64)

See cairo_user_to_device().

C API documentation: http://cairographics.org/manual/cairo-Transformations.html#cairo-user-to-device

func (*Context) UserToDeviceDistance

func (cr *Context) UserToDeviceDistance(dx, dy *float64)

See cairo_user_to_device_distance().

C API documentation: http://cairographics.org/manual/cairo-Transformations.html#cairo-user-to-device-distance

type Device

type Device struct {
	Ptr *C.cairo_device_t
}

See cairo_device_t.

C API documentation: http://cairographics.org/manual/cairo-cairo-device-t.html#cairo-device-t

func BorrowDevice

func BorrowDevice(p unsafe.Pointer) *Device

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.

func WrapDevice

func WrapDevice(p unsafe.Pointer) *Device

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.

func (*Device) Acquire

func (device *Device) Acquire() error

See cairo_device_acquire().

C API documentation: http://cairographics.org/manual/cairo-cairo-device-t.html#cairo-device-acquire

func (*Device) Finish

func (device *Device) Finish()

See cairo_device_finish().

C API documentation: http://cairographics.org/manual/cairo-cairo-device-t.html#cairo-device-finish

func (*Device) Flush

func (device *Device) Flush()

See cairo_device_flush().

C API documentation: http://cairographics.org/manual/cairo-cairo-device-t.html#cairo-device-flush

func (*Device) GetType

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

func (*Device) ObserverElapsed

func (device *Device) ObserverElapsed() float64

See cairo_device_observer_elapsed().

C API documentation: http://cairographics.org/manual/cairo-cairo-device-t.html#cairo-device-observer-elapsed

func (*Device) ObserverFillElapsed

func (device *Device) ObserverFillElapsed() float64

See cairo_device_observer_fill_elapsed().

C API documentation: http://cairographics.org/manual/cairo-cairo-device-t.html#cairo-device-observer-fill-elapsed

func (*Device) ObserverGlyphsElapsed

func (device *Device) ObserverGlyphsElapsed() float64

See cairo_device_observer_glyphs_elapsed().

C API documentation: http://cairographics.org/manual/cairo-cairo-device-t.html#cairo-device-observer-glyphs-elapsed

func (*Device) ObserverMaskElapsed

func (device *Device) ObserverMaskElapsed() float64

See cairo_device_observer_mask_elapsed().

C API documentation: http://cairographics.org/manual/cairo-cairo-device-t.html#cairo-device-observer-mask-elapsed

func (*Device) ObserverPaintElapsed

func (device *Device) ObserverPaintElapsed() float64

See cairo_device_observer_paint_elapsed().

C API documentation: http://cairographics.org/manual/cairo-cairo-device-t.html#cairo-device-observer-paint-elapsed

func (*Device) ObserverStrokeElapsed

func (device *Device) ObserverStrokeElapsed() float64

See cairo_device_observer_stroke_elapsed().

C API documentation: http://cairographics.org/manual/cairo-cairo-device-t.html#cairo-device-observer-stroke-elapsed

func (*Device) Release

func (device *Device) Release()

See cairo_device_release().

C API documentation: http://cairographics.org/manual/cairo-cairo-device-t.html#cairo-device-release

type DeviceType

type DeviceType int

See cairo_device_type_t.

C API documentation: http://cairographics.org/manual/cairo-cairo-device-t.html#cairo-device-type-t

func (DeviceType) String

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.

type Extend

type Extend int

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
)

func (Extend) String

func (i Extend) 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 FillRule

type FillRule int

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
)

func (FillRule) String

func (i FillRule) 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 Filter

type Filter int

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
)

func (Filter) String

func (i Filter) 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 FontExtents

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

type FontFace

type FontFace struct {
	Ptr *C.cairo_font_face_t
}

See cairo_font_face_t.

C API documentation: http://cairographics.org/manual/cairo-cairo-font-face-t.html#cairo-font-face-t

func BorrowFontFace

func BorrowFontFace(p unsafe.Pointer) *FontFace

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.

func UserFontFaceCreate

func UserFontFaceCreate() *FontFace

See cairo_user_font_face_create().

C API documentation: http://cairographics.org/manual/cairo-User-Fonts.html#cairo-user-font-face-create

func WrapFontFace

func WrapFontFace(p unsafe.Pointer) *FontFace

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.

func (*FontFace) GetType

func (fontFace *FontFace) GetType() FontType

See cairo_font_face_get_type().

C API documentation: http://cairographics.org/manual/cairo-cairo-font-face-t.html#cairo-font-face-get-type

type FontOptions

type FontOptions struct {
	Ptr *C.cairo_font_options_t
}

See cairo_font_options_t.

C API documentation: http://cairographics.org/manual/cairo-cairo-font-options-t.html#cairo-font-options-t

func BorrowFontOptions

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

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

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 (*FontOptions) Copy

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 (*FontOptions) Equal

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 (*FontOptions) GetAntialias

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 (*FontOptions) GetHintMetrics

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 (*FontOptions) GetHintStyle

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 (*FontOptions) GetSubpixelOrder

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 (*FontOptions) Hash

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 (*FontOptions) Merge

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 (*FontOptions) SetAntialias

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 (*FontOptions) SetHintMetrics

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 (*FontOptions) SetHintStyle

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 (*FontOptions) SetSubpixelOrder

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

type FontSlant

type FontSlant int

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
)

func (FontSlant) String

func (i FontSlant) 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 FontType

type FontType int

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
)

func (FontType) String

func (i FontType) 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 FontWeight

type FontWeight int

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 (FontWeight) String

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.

type Format

type Format int

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
)

func (Format) StrideForWidth

func (format Format) StrideForWidth(width int) int

See cairo_format_stride_for_width().

C API documentation: http://cairographics.org/manual/cairo-Image-Surfaces.html#cairo-format-stride-for-width

func (Format) String

func (i Format) 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 Glyph

type Glyph struct {
	Index uint32
	X     float64
	Y     float64
}

See cairo_glyph_t.

C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-glyph-t

type HintMetrics

type HintMetrics int

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 (HintMetrics) String

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.

type HintStyle

type HintStyle int

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
)

func (HintStyle) String

func (i HintStyle) 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 ImageSurface

type ImageSurface struct {
	*Surface
}

func ImageSurfaceCreate

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

func ImageSurfaceCreateFromPNGStream(r io.Reader) (*ImageSurface, error)

ImageSurfaceCreateFromPNGStream creates an ImageSurface from a stream of PNG data.

func (*ImageSurface) 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 (*ImageSurface) GetFormat

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 (*ImageSurface) GetHeight

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 (*ImageSurface) GetStride

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 (*ImageSurface) GetWidth

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

type LineCap

type LineCap int

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
)

func (LineCap) String

func (i LineCap) 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 LineJoin

type LineJoin int

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
)

func (LineJoin) String

func (i LineJoin) 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 Matrix

type Matrix struct {
	Xx float64
	Yx float64
	Xy float64
	Yy float64
	X0 float64
	Y0 float64
}

See cairo_matrix_t.

C API documentation: http://cairographics.org/manual/cairo-cairo-matrix-t.html#cairo-matrix-t

func (*Matrix) InitIdentity

func (matrix *Matrix) InitIdentity()

See cairo_matrix_init_identity().

C API documentation: http://cairographics.org/manual/cairo-cairo-matrix-t.html#cairo-matrix-init-identity

func (*Matrix) InitRotate

func (matrix *Matrix) InitRotate(radians float64)

See cairo_matrix_init_rotate().

C API documentation: http://cairographics.org/manual/cairo-cairo-matrix-t.html#cairo-matrix-init-rotate

func (*Matrix) InitScale

func (matrix *Matrix) InitScale(sx, sy float64)

See cairo_matrix_init_scale().

C API documentation: http://cairographics.org/manual/cairo-cairo-matrix-t.html#cairo-matrix-init-scale

func (*Matrix) InitTranslate

func (matrix *Matrix) InitTranslate(tx, ty float64)

See cairo_matrix_init_translate().

C API documentation: http://cairographics.org/manual/cairo-cairo-matrix-t.html#cairo-matrix-init-translate

func (*Matrix) Invert

func (matrix *Matrix) Invert() error

See cairo_matrix_invert().

C API documentation: http://cairographics.org/manual/cairo-cairo-matrix-t.html#cairo-matrix-invert

func (*Matrix) Multiply

func (result *Matrix) Multiply(a, b *Matrix)

See cairo_matrix_multiply().

C API documentation: http://cairographics.org/manual/cairo-cairo-matrix-t.html#cairo-matrix-multiply

func (*Matrix) Rotate

func (matrix *Matrix) Rotate(radians float64)

See cairo_matrix_rotate().

C API documentation: http://cairographics.org/manual/cairo-cairo-matrix-t.html#cairo-matrix-rotate

func (*Matrix) Scale

func (matrix *Matrix) Scale(sx, sy float64)

See cairo_matrix_scale().

C API documentation: http://cairographics.org/manual/cairo-cairo-matrix-t.html#cairo-matrix-scale

func (*Matrix) TransformDistance

func (matrix *Matrix) TransformDistance(dx, dy *float64)

See cairo_matrix_transform_distance().

C API documentation: http://cairographics.org/manual/cairo-cairo-matrix-t.html#cairo-matrix-transform-distance

func (*Matrix) TransformPoint

func (matrix *Matrix) TransformPoint(x, y *float64)

See cairo_matrix_transform_point().

C API documentation: http://cairographics.org/manual/cairo-cairo-matrix-t.html#cairo-matrix-transform-point

func (*Matrix) Translate

func (matrix *Matrix) Translate(tx, ty float64)

See cairo_matrix_translate().

C API documentation: http://cairographics.org/manual/cairo-cairo-matrix-t.html#cairo-matrix-translate

type MeshPattern

type MeshPattern struct {
	*Pattern
}

func (*MeshPattern) BeginPatch

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 (*MeshPattern) CurveTo

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 (*MeshPattern) EndPatch

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 (*MeshPattern) GetPath

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 (*MeshPattern) LineTo

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 (*MeshPattern) MoveTo

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 (*MeshPattern) SetControlPoint

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 (*MeshPattern) SetCornerColorRGB

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 (*MeshPattern) SetCornerColorRGBA

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

type Operator

type Operator int

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
)

func (Operator) String

func (i Operator) 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 Path

type Path struct {
	Ptr *C.cairo_path_t
}

See cairo_path_t.

C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-path-t

func BorrowPath

func BorrowPath(p unsafe.Pointer) *Path

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.

func WrapPath

func WrapPath(p unsafe.Pointer) *Path

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.

func (*Path) Iter

func (p *Path) Iter() *PathIter

PathIter creates an iterator over the segments within the path.

type PathDataType

type PathDataType int

See cairo_path_data_type_t.

C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-path-data-type-t

func (PathDataType) String

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

type PathIter struct {
	// contains filtered or unexported fields
}

PathIter iterates a Path.

func (*PathIter) Next

func (pi *PathIter) Next() *PathSegment

Next returns the next PathSegment, or returns nil at the end of the path.

type PathPoint

type PathPoint struct {
	X, Y float64
}

PathPoints are produced by iterating paths.

type PathSegment

type PathSegment struct {
	Type   PathDataType
	Points []PathPoint
}

PathSegments are produced by iterating paths.

type Pattern

type Pattern struct {
	Ptr *C.cairo_pattern_t
}

See cairo_pattern_t.

C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-t

func BorrowPattern

func BorrowPattern(p unsafe.Pointer) *Pattern

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.

func PatternCreateForSurface

func PatternCreateForSurface(surface *Surface) *Pattern

See cairo_pattern_create_for_surface().

C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-create-for-surface

func PatternCreateLinear

func PatternCreateLinear(x0, y0, x1, y1 float64) *Pattern

See cairo_pattern_create_linear().

C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-create-linear

func PatternCreateMesh

func PatternCreateMesh() *Pattern

See cairo_pattern_create_mesh().

C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-create-mesh

func PatternCreateRGB

func PatternCreateRGB(red, green, blue float64) *Pattern

See cairo_pattern_create_rgb().

C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-create-rgb

func PatternCreateRGBA

func PatternCreateRGBA(red, green, blue, alpha float64) *Pattern

See cairo_pattern_create_rgba().

C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-create-rgba

func PatternCreateRadial

func PatternCreateRadial(cx0, cy0, radius0, cx1, cy1, radius1 float64) *Pattern

See cairo_pattern_create_radial().

C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-create-radial

func WrapPattern

func WrapPattern(p unsafe.Pointer) *Pattern

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.

func (*Pattern) AddColorStopRGB

func (pattern *Pattern) AddColorStopRGB(offset, red, green, blue float64)

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

func (*Pattern) AddColorStopRGBA

func (pattern *Pattern) AddColorStopRGBA(offset, red, green, blue, alpha float64)

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

func (*Pattern) GetExtend

func (pattern *Pattern) GetExtend() Extend

See cairo_pattern_get_extend().

C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-get-extend

func (*Pattern) GetFilter

func (pattern *Pattern) GetFilter() Filter

See cairo_pattern_get_filter().

C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-get-filter

func (*Pattern) GetMatrix

func (pattern *Pattern) GetMatrix(matrix *Matrix)

See cairo_pattern_get_matrix().

C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-get-matrix

func (*Pattern) GetType

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

func (*Pattern) SetExtend

func (pattern *Pattern) SetExtend(extend Extend)

See cairo_pattern_set_extend().

C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-set-extend

func (*Pattern) SetFilter

func (pattern *Pattern) SetFilter(filter Filter)

See cairo_pattern_set_filter().

C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-set-filter

func (*Pattern) SetMatrix

func (pattern *Pattern) SetMatrix(matrix *Matrix)

See cairo_pattern_set_matrix().

C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-set-matrix

type PatternType

type PatternType int

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 (PatternType) String

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.

type RecordingSurface

type RecordingSurface struct {
	*Surface
}

func RecordingSurfaceCreate

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 (*RecordingSurface) GetExtents

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

func (*RecordingSurface) InkExtents

func (surface *RecordingSurface) InkExtents() (float64, float64, float64, float64)

See cairo_recording_surface_ink_extents().

C API documentation: http://cairographics.org/manual/cairo-Recording-Surfaces.html#cairo-recording-surface-ink-extents

type Rectangle

type Rectangle struct {
	X      float64
	Y      float64
	Width  float64
	Height float64
}

See cairo_rectangle_t.

C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-rectangle-t

type Region

type Region struct {
	Ptr *C.cairo_region_t
}

See cairo_region_t.

C API documentation: http://cairographics.org/manual/cairo-Regions.html#cairo-region-t

func BorrowRegion

func BorrowRegion(p unsafe.Pointer) *Region

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.

func RegionCreate

func RegionCreate() *Region

See cairo_region_create().

C API documentation: http://cairographics.org/manual/cairo-Regions.html#cairo-region-create

func WrapRegion

func WrapRegion(p unsafe.Pointer) *Region

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.

func (*Region) ContainsPoint

func (region *Region) ContainsPoint(x, y int) bool

See cairo_region_contains_point().

C API documentation: http://cairographics.org/manual/cairo-Regions.html#cairo-region-contains-point

func (*Region) Copy

func (original *Region) Copy() *Region

See cairo_region_copy().

C API documentation: http://cairographics.org/manual/cairo-Regions.html#cairo-region-copy

func (*Region) Equal

func (a *Region) Equal(b *Region) bool

See cairo_region_equal().

C API documentation: http://cairographics.org/manual/cairo-Regions.html#cairo-region-equal

func (*Region) Intersect

func (dst *Region) Intersect(other *Region) error

See cairo_region_intersect().

C API documentation: http://cairographics.org/manual/cairo-Regions.html#cairo-region-intersect

func (*Region) IsEmpty

func (region *Region) IsEmpty() bool

See cairo_region_is_empty().

C API documentation: http://cairographics.org/manual/cairo-Regions.html#cairo-region-is-empty

func (*Region) NumRectangles

func (region *Region) NumRectangles() int

See cairo_region_num_rectangles().

C API documentation: http://cairographics.org/manual/cairo-Regions.html#cairo-region-num-rectangles

func (*Region) Subtract

func (dst *Region) Subtract(other *Region) error

See cairo_region_subtract().

C API documentation: http://cairographics.org/manual/cairo-Regions.html#cairo-region-subtract

func (*Region) Translate

func (region *Region) Translate(dx, dy int)

See cairo_region_translate().

C API documentation: http://cairographics.org/manual/cairo-Regions.html#cairo-region-translate

func (*Region) Union

func (dst *Region) Union(other *Region) error

See cairo_region_union().

C API documentation: http://cairographics.org/manual/cairo-Regions.html#cairo-region-union

func (*Region) XOR

func (dst *Region) XOR(other *Region) error

See cairo_region_xor().

C API documentation: http://cairographics.org/manual/cairo-Regions.html#cairo-region-xor

type RegionOverlap

type RegionOverlap int

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 (RegionOverlap) String

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.

type SVGSurface

type SVGSurface struct {
	*Surface
}

func SVGSurfaceCreate

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 (*SVGSurface) RestrictToVersion

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

type SVGVersion

type SVGVersion int

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

func SVGGetVersions() []SVGVersion

See cairo_svg_get_versions().

C API documentation: http://cairographics.org/manual/cairo-SVG-Surfaces.html#cairo-svg-get-versions

func (SVGVersion) String

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 (SVGVersion) ToString

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

type ScaledFont

type ScaledFont struct {
	Ptr *C.cairo_scaled_font_t
}

See cairo_scaled_font_t.

C API documentation: http://cairographics.org/manual/cairo-cairo-scaled-font-t.html#cairo-scaled-font-t

func BorrowScaledFont

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

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

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) Extents

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) GetCTM

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) GetFontFace

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) GetFontMatrix

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) GetFontOptions

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) GetScaleMatrix

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) GetType

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) GlyphExtents

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) TextExtents

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

type Status

type Status int

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
)

func (Status) Error

func (s Status) Error() string

Error implements the error interface.

type SubpixelOrder

type SubpixelOrder int

See cairo_subpixel_order_t.

C API documentation: http://cairographics.org/manual/cairo-cairo-font-options-t.html#cairo-subpixel-order-t

func (SubpixelOrder) String

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.

type Surface

type Surface struct {
	Ptr *C.cairo_surface_t
}

See cairo_surface_t.

C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-t

func BorrowSurface

func BorrowSurface(p unsafe.Pointer) *Surface

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.

func WrapSurface

func WrapSurface(p unsafe.Pointer) *Surface

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.

func (*Surface) CopyPage

func (surface *Surface) CopyPage()

See cairo_surface_copy_page().

C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-copy-page

func (*Surface) CreateForRectangle

func (target *Surface) CreateForRectangle(x, y, width, height float64) *Surface

See cairo_surface_create_for_rectangle().

C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-create-for-rectangle

func (*Surface) CreateObserver

func (target *Surface) CreateObserver(mode SurfaceObserverMode) *SurfaceObserver

See cairo_surface_create_observer().

func (*Surface) CreateSimilar

func (other *Surface) CreateSimilar(content Content, width, height int) *Surface

See cairo_surface_create_similar().

C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-create-similar

func (*Surface) CreateSimilarImage

func (other *Surface) CreateSimilarImage(format Format, width, height int) *Surface

See cairo_surface_create_similar_image().

C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-create-similar-image

func (*Surface) Finish

func (surface *Surface) Finish()

See cairo_surface_finish().

C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-finish

func (*Surface) Flush

func (surface *Surface) Flush()

See cairo_surface_flush().

C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-flush

func (*Surface) GetContent

func (surface *Surface) GetContent() Content

See cairo_surface_get_content().

C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-get-content

func (*Surface) GetDevice

func (surface *Surface) GetDevice() *Device

See cairo_surface_get_device().

C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-get-device

func (*Surface) GetDeviceOffset

func (surface *Surface) GetDeviceOffset() (float64, float64)

See cairo_surface_get_device_offset().

C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-get-device-offset

func (*Surface) GetDeviceScale

func (surface *Surface) GetDeviceScale() (float64, float64)

See cairo_surface_get_device_scale().

C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-get-device-scale

func (*Surface) GetFallbackResolution

func (surface *Surface) GetFallbackResolution() (float64, float64)

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) GetFontOptions

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) GetType

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

func (*Surface) HasShowTextGlyphs

func (surface *Surface) HasShowTextGlyphs() bool

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

func (*Surface) MarkDirty

func (surface *Surface) MarkDirty()

See cairo_surface_mark_dirty().

C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-mark-dirty

func (*Surface) MarkDirtyRectangle

func (surface *Surface) MarkDirtyRectangle(x, y, width, height int)

See cairo_surface_mark_dirty_rectangle().

C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-mark-dirty-rectangle

func (*Surface) SetDeviceOffset

func (surface *Surface) SetDeviceOffset(xOffset, yOffset float64)

See cairo_surface_set_device_offset().

C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-set-device-offset

func (*Surface) SetDeviceScale

func (surface *Surface) SetDeviceScale(xScale, yScale float64)

See cairo_surface_set_device_scale().

C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-set-device-scale

func (*Surface) SetFallbackResolution

func (surface *Surface) SetFallbackResolution(xPixelsPerInch, yPixelsPerInch float64)

See cairo_surface_set_fallback_resolution().

C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-set-fallback-resolution

func (*Surface) ShowPage

func (surface *Surface) ShowPage()

See cairo_surface_show_page().

C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-show-page

func (*Surface) SupportsMimeType

func (surface *Surface) SupportsMimeType(mimeType string) bool

See cairo_surface_supports_mime_type().

C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-supports-mime-type

func (*Surface) UnmapImage

func (surface *Surface) UnmapImage(image *Surface)

See cairo_surface_unmap_image().

C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-unmap-image

func (*Surface) WriteToPNG

func (surface *Surface) WriteToPNG(w io.Writer) error

WriteToPNG encodes a Surface to an io.Writer as a PNG file.

type SurfaceObserver

type SurfaceObserver struct {
	*Surface
}

func (*SurfaceObserver) Elapsed

func (surface *SurfaceObserver) Elapsed() float64

See cairo_surface_observer_elapsed().

type SurfaceObserverMode

type SurfaceObserverMode int

See cairo_surface_observer_mode_t.

const (
	SurfaceObserverNormal           SurfaceObserverMode = C.CAIRO_SURFACE_OBSERVER_NORMAL
	SurfaceObserverRecordOperations SurfaceObserverMode = C.CAIRO_SURFACE_OBSERVER_RECORD_OPERATIONS
)

func (SurfaceObserverMode) String

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.

type SurfaceType

type SurfaceType int

See cairo_surface_type_t.

C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-type-t

func (SurfaceType) String

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.

type TextClusterFlags

type TextClusterFlags int

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 (TextClusterFlags) String

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

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

type ToyFontFace

type ToyFontFace struct {
	*FontFace
}

func ToyFontFaceCreate

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 (*ToyFontFace) GetFamily

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 (*ToyFontFace) GetSlant

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 (*ToyFontFace) GetWeight

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

type XlibDevice

type XlibDevice struct {
	*Device
}

func (*XlibDevice) DebugCapXrenderVersion

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 (*XlibDevice) DebugGetPrecision

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 (*XlibDevice) DebugSetPrecision

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

type XlibSurface

type XlibSurface struct {
	*Surface
}

func XlibSurfaceCreate

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

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 (*XlibSurface) GetDepth

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 (*XlibSurface) GetDisplay

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 (*XlibSurface) GetDrawable

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 (*XlibSurface) GetHeight

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 (*XlibSurface) GetScreen

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 (*XlibSurface) GetVisual

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 (*XlibSurface) GetWidth

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 (*XlibSurface) SetDrawable

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 (*XlibSurface) SetSize

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL