Documentation
¶
Overview ¶
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.
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 ¶
- func Version() int
- func VersionString() string
- type Antialias
- type Content
- type Context
- func (cr *Context) AppendPath(path *Path)
- func (cr *Context) Arc(xc, yc, radius, angle1, angle2 float64)
- func (cr *Context) ArcNegative(xc, yc, radius, angle1, angle2 float64)
- func (cr *Context) Clip()
- func (cr *Context) ClipExtents() (float64, float64, float64, float64)
- func (cr *Context) ClipPreserve()
- func (cr *Context) ClosePath()
- func (cr *Context) CopyPage()
- func (cr *Context) CopyPath() *Path
- func (cr *Context) CopyPathFlat() *Path
- func (cr *Context) CurveTo(x1, y1, x2, y2, x3, y3 float64)
- func (cr *Context) DeviceToUser(x, y *float64)
- func (cr *Context) DeviceToUserDistance(dx, dy *float64)
- func (cr *Context) Fill()
- func (cr *Context) FillExtents() (float64, float64, float64, float64)
- func (cr *Context) FillPreserve()
- func (cr *Context) FontExtents(extents *FontExtents)
- func (cr *Context) GetAntialias() Antialias
- func (cr *Context) GetCurrentPoint() (float64, float64)
- func (cr *Context) GetDash(dashes, offset *float64)
- func (cr *Context) GetDashCount() int
- func (cr *Context) GetFillRule() FillRule
- func (cr *Context) GetFontFace() *FontFace
- func (cr *Context) GetFontMatrix(matrix *Matrix)
- func (cr *Context) GetFontOptions(options *FontOptions)
- func (cr *Context) GetGroupTarget() *Surface
- func (cr *Context) GetLineCap() LineCap
- func (cr *Context) GetLineJoin() LineJoin
- func (cr *Context) GetLineWidth() float64
- func (cr *Context) GetMatrix(matrix *Matrix)
- func (cr *Context) GetMiterLimit() float64
- func (cr *Context) GetOperator() Operator
- func (cr *Context) GetScaledFont() *ScaledFont
- func (cr *Context) GetSource() *Pattern
- func (cr *Context) GetTarget() *Surface
- func (cr *Context) GetTolerance() float64
- func (cr *Context) GlyphExtents(glyphs []Glyph, extents *TextExtents)
- func (cr *Context) GlyphPath(glyphs []Glyph)
- func (cr *Context) HasCurrentPoint() bool
- func (cr *Context) IdentityMatrix()
- func (cr *Context) InClip(x, y float64) bool
- func (cr *Context) InFill(x, y float64) bool
- func (cr *Context) InStroke(x, y float64) bool
- func (cr *Context) LineTo(x, y float64)
- func (cr *Context) Mask(pattern *Pattern)
- func (cr *Context) MaskSurface(surface *Surface, surfaceX, surfaceY float64)
- func (cr *Context) MoveTo(x, y float64)
- func (cr *Context) NewPath()
- func (cr *Context) NewSubPath()
- func (cr *Context) Paint()
- func (cr *Context) PaintWithAlpha(alpha float64)
- func (cr *Context) PathExtents() (float64, float64, float64, float64)
- func (cr *Context) PopGroup() *Pattern
- func (cr *Context) PopGroupToSource()
- func (cr *Context) PushGroup()
- func (cr *Context) PushGroupWithContent(content Content)
- func (cr *Context) Rectangle(x, y, width, height float64)
- func (cr *Context) RelCurveTo(dx1, dy1, dx2, dy2, dx3, dy3 float64)
- func (cr *Context) RelLineTo(dx, dy float64)
- func (cr *Context) RelMoveTo(dx, dy float64)
- func (cr *Context) ResetClip()
- func (cr *Context) Restore()
- func (cr *Context) Rotate(angle float64)
- func (cr *Context) Save()
- func (cr *Context) Scale(sx, sy float64)
- func (cr *Context) SelectFontFace(family string, slant FontSlant, weight FontWeight)
- func (cr *Context) SetAntialias(antialias Antialias)
- func (cr *Context) SetDash(dashes []float64, offset float64)
- func (cr *Context) SetFillRule(fillRule FillRule)
- func (cr *Context) SetFontFace(fontFace *FontFace)
- func (cr *Context) SetFontMatrix(matrix *Matrix)
- func (cr *Context) SetFontOptions(options *FontOptions)
- func (cr *Context) SetFontSize(size float64)
- func (cr *Context) SetLineCap(lineCap LineCap)
- func (cr *Context) SetLineJoin(lineJoin LineJoin)
- func (cr *Context) SetLineWidth(width float64)
- func (cr *Context) SetMatrix(matrix *Matrix)
- func (cr *Context) SetMiterLimit(limit float64)
- func (cr *Context) SetOperator(op Operator)
- func (cr *Context) SetScaledFont(scaledFont *ScaledFont)
- func (cr *Context) SetSource(source *Pattern)
- func (cr *Context) SetSourceRGB(red, green, blue float64)
- func (cr *Context) SetSourceRGBA(red, green, blue, alpha float64)
- func (cr *Context) SetSourceSurface(surface *Surface, x, y float64)
- func (cr *Context) SetTolerance(tolerance float64)
- func (cr *Context) ShowGlyphs(glyphs []Glyph)
- func (cr *Context) ShowPage()
- func (cr *Context) ShowText(utf8 string)
- func (cr *Context) Stroke()
- func (cr *Context) StrokeExtents() (float64, float64, float64, float64)
- func (cr *Context) StrokePreserve()
- func (cr *Context) TextExtents(utf8 string, extents *TextExtents)
- func (cr *Context) TextPath(utf8 string)
- func (cr *Context) Transform(matrix *Matrix)
- func (cr *Context) Translate(tx, ty float64)
- func (cr *Context) UserToDevice(x, y *float64)
- func (cr *Context) UserToDeviceDistance(dx, dy *float64)
- type Device
- func (device *Device) Acquire() error
- func (device *Device) Finish()
- func (device *Device) Flush()
- func (device *Device) GetType() DeviceType
- func (device *Device) ObserverElapsed() float64
- func (device *Device) ObserverFillElapsed() float64
- func (device *Device) ObserverGlyphsElapsed() float64
- func (device *Device) ObserverMaskElapsed() float64
- func (device *Device) ObserverPaintElapsed() float64
- func (device *Device) ObserverStrokeElapsed() float64
- func (device *Device) Release()
- type DeviceType
- type Extend
- type FillRule
- type Filter
- type FontExtents
- type FontFace
- type FontOptions
- func (original *FontOptions) Copy() *FontOptions
- func (options *FontOptions) Equal(other *FontOptions) bool
- func (options *FontOptions) GetAntialias() Antialias
- func (options *FontOptions) GetHintMetrics() HintMetrics
- func (options *FontOptions) GetHintStyle() HintStyle
- func (options *FontOptions) GetSubpixelOrder() SubpixelOrder
- func (options *FontOptions) Hash() uint32
- func (options *FontOptions) Merge(other *FontOptions)
- func (options *FontOptions) SetAntialias(antialias Antialias)
- func (options *FontOptions) SetHintMetrics(hintMetrics HintMetrics)
- func (options *FontOptions) SetHintStyle(hintStyle HintStyle)
- func (options *FontOptions) SetSubpixelOrder(subpixelOrder SubpixelOrder)
- type FontSlant
- type FontType
- type FontWeight
- type Format
- type Glyph
- type HintMetrics
- type HintStyle
- type ImageSurface
- type LineCap
- type LineJoin
- type Matrix
- func (matrix *Matrix) InitIdentity()
- func (matrix *Matrix) InitRotate(radians float64)
- func (matrix *Matrix) InitScale(sx, sy float64)
- func (matrix *Matrix) InitTranslate(tx, ty float64)
- func (matrix *Matrix) Invert() error
- func (result *Matrix) Multiply(a, b *Matrix)
- func (matrix *Matrix) Rotate(radians float64)
- func (matrix *Matrix) Scale(sx, sy float64)
- func (matrix *Matrix) TransformDistance(dx, dy *float64)
- func (matrix *Matrix) TransformPoint(x, y *float64)
- func (matrix *Matrix) Translate(tx, ty float64)
- type MeshPattern
- func (pattern *MeshPattern) BeginPatch()
- func (pattern *MeshPattern) CurveTo(x1, y1, x2, y2, x3, y3 float64)
- func (pattern *MeshPattern) EndPatch()
- func (pattern *MeshPattern) GetPath(patchNum int) *Path
- func (pattern *MeshPattern) LineTo(x, y float64)
- func (pattern *MeshPattern) MoveTo(x, y float64)
- func (pattern *MeshPattern) SetControlPoint(pointNum int, x, y float64)
- func (pattern *MeshPattern) SetCornerColorRGB(cornerNum int, red, green, blue float64)
- func (pattern *MeshPattern) SetCornerColorRGBA(cornerNum int, red, green, blue, alpha float64)
- type Operator
- type Path
- type PathDataType
- type PathIter
- type PathPoint
- type PathSegment
- type Pattern
- func BorrowPattern(p unsafe.Pointer) *Pattern
- func PatternCreateForSurface(surface *Surface) *Pattern
- func PatternCreateLinear(x0, y0, x1, y1 float64) *Pattern
- func PatternCreateMesh() *Pattern
- func PatternCreateRGB(red, green, blue float64) *Pattern
- func PatternCreateRGBA(red, green, blue, alpha float64) *Pattern
- func PatternCreateRadial(cx0, cy0, radius0, cx1, cy1, radius1 float64) *Pattern
- func WrapPattern(p unsafe.Pointer) *Pattern
- func (pattern *Pattern) AddColorStopRGB(offset, red, green, blue float64)
- func (pattern *Pattern) AddColorStopRGBA(offset, red, green, blue, alpha float64)
- func (pattern *Pattern) GetExtend() Extend
- func (pattern *Pattern) GetFilter() Filter
- func (pattern *Pattern) GetMatrix(matrix *Matrix)
- func (pattern *Pattern) GetType() PatternType
- func (pattern *Pattern) SetExtend(extend Extend)
- func (pattern *Pattern) SetFilter(filter Filter)
- func (pattern *Pattern) SetMatrix(matrix *Matrix)
- type PatternType
- type RecordingSurface
- type Rectangle
- type Region
- func (region *Region) ContainsPoint(x, y int) bool
- func (original *Region) Copy() *Region
- func (a *Region) Equal(b *Region) bool
- func (dst *Region) Intersect(other *Region) error
- func (region *Region) IsEmpty() bool
- func (region *Region) NumRectangles() int
- func (dst *Region) Subtract(other *Region) error
- func (region *Region) Translate(dx, dy int)
- func (dst *Region) Union(other *Region) error
- func (dst *Region) XOR(other *Region) error
- type RegionOverlap
- type SVGSurface
- type SVGVersion
- type ScaledFont
- func (scaledFont *ScaledFont) Extents(extents *FontExtents)
- func (scaledFont *ScaledFont) GetCTM(ctm *Matrix)
- func (scaledFont *ScaledFont) GetFontFace() *FontFace
- func (scaledFont *ScaledFont) GetFontMatrix(fontMatrix *Matrix)
- func (scaledFont *ScaledFont) GetFontOptions(options *FontOptions)
- func (scaledFont *ScaledFont) GetScaleMatrix(scaleMatrix *Matrix)
- func (scaledFont *ScaledFont) GetType() FontType
- func (scaledFont *ScaledFont) GlyphExtents(glyphs []Glyph, extents *TextExtents)
- func (scaledFont *ScaledFont) TextExtents(utf8 string, extents *TextExtents)
- type Status
- type SubpixelOrder
- type Surface
- func (surface *Surface) CopyPage()
- func (target *Surface) CreateForRectangle(x, y, width, height float64) *Surface
- func (target *Surface) CreateObserver(mode SurfaceObserverMode) *SurfaceObserver
- func (other *Surface) CreateSimilar(content Content, width, height int) *Surface
- func (other *Surface) CreateSimilarImage(format Format, width, height int) *Surface
- func (surface *Surface) Finish()
- func (surface *Surface) Flush()
- func (surface *Surface) GetContent() Content
- func (surface *Surface) GetDevice() *Device
- func (surface *Surface) GetDeviceOffset() (float64, float64)
- func (surface *Surface) GetDeviceScale() (float64, float64)
- func (surface *Surface) GetFallbackResolution() (float64, float64)
- func (surface *Surface) GetFontOptions(options *FontOptions)
- func (surface *Surface) GetType() SurfaceType
- func (surface *Surface) HasShowTextGlyphs() bool
- func (surface *Surface) MarkDirty()
- func (surface *Surface) MarkDirtyRectangle(x, y, width, height int)
- func (surface *Surface) SetDeviceOffset(xOffset, yOffset float64)
- func (surface *Surface) SetDeviceScale(xScale, yScale float64)
- func (surface *Surface) SetFallbackResolution(xPixelsPerInch, yPixelsPerInch float64)
- func (surface *Surface) ShowPage()
- func (surface *Surface) SupportsMimeType(mimeType string) bool
- func (surface *Surface) UnmapImage(image *Surface)
- func (surface *Surface) WriteToPNG(w io.Writer) error
- type SurfaceObserver
- type SurfaceObserverMode
- type SurfaceType
- type TextClusterFlags
- type TextExtents
- type ToyFontFace
- type XlibDevice
- type XlibSurface
- func (surface *XlibSurface) GetDepth() int
- func (surface *XlibSurface) GetDisplay() unsafe.Pointer
- func (surface *XlibSurface) GetDrawable() uint64
- func (surface *XlibSurface) GetHeight() int
- func (surface *XlibSurface) GetScreen() unsafe.Pointer
- func (surface *XlibSurface) GetVisual() unsafe.Pointer
- func (surface *XlibSurface) GetWidth() int
- func (surface *XlibSurface) SetDrawable(drawable uint64, width, height int)
- func (surface *XlibSurface) SetSize(width, height int)
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 )
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 )
type Context ¶
See cairo_t.
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-t
func BorrowContext ¶
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 ¶
See cairo_create().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-create
func WrapContext ¶
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 ¶
See cairo_append_path().
C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-append-path
func (*Context) Arc ¶
See cairo_arc().
C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-arc
func (*Context) ArcNegative ¶
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 ¶
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 ¶
See cairo_copy_path().
C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-copy-path
func (*Context) CopyPathFlat ¶
See cairo_copy_path_flat().
C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-copy-path-flat
func (*Context) CurveTo ¶
See cairo_curve_to().
C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-curve-to
func (*Context) DeviceToUser ¶
See cairo_device_to_user().
C API documentation: http://cairographics.org/manual/cairo-Transformations.html#cairo-device-to-user
func (*Context) DeviceToUserDistance ¶
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 ¶
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 ¶
See cairo_get_antialias().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-antialias
func (*Context) GetCurrentPoint ¶
See cairo_get_current_point().
C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-get-current-point
func (*Context) GetDash ¶
See cairo_get_dash().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-dash
func (*Context) GetDashCount ¶
See cairo_get_dash_count().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-dash-count
func (*Context) GetFillRule ¶
See cairo_get_fill_rule().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-fill-rule
func (*Context) GetFontFace ¶
See cairo_get_font_face().
C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-get-font-face
func (*Context) GetFontMatrix ¶
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 ¶
See cairo_get_group_target().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-group-target
func (*Context) GetLineCap ¶
See cairo_get_line_cap().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-line-cap
func (*Context) GetLineJoin ¶
See cairo_get_line_join().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-line-join
func (*Context) GetLineWidth ¶
See cairo_get_line_width().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-line-width
func (*Context) GetMatrix ¶
See cairo_get_matrix().
C API documentation: http://cairographics.org/manual/cairo-Transformations.html#cairo-get-matrix
func (*Context) GetMiterLimit ¶
See cairo_get_miter_limit().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-miter-limit
func (*Context) GetOperator ¶
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 ¶
See cairo_get_source().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-source
func (*Context) GetTarget ¶
See cairo_get_target().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-get-target
func (*Context) GetTolerance ¶
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 ¶
See cairo_glyph_path().
C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-glyph-path
func (*Context) HasCurrentPoint ¶
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 ¶
See cairo_in_clip().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-in-clip
func (*Context) InFill ¶
See cairo_in_fill().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-in-fill
func (*Context) InStroke ¶
See cairo_in_stroke().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-in-stroke
func (*Context) LineTo ¶
See cairo_line_to().
C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-line-to
func (*Context) Mask ¶
See cairo_mask().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-mask
func (*Context) MaskSurface ¶
See cairo_mask_surface().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-mask-surface
func (*Context) MoveTo ¶
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 ¶
See cairo_paint_with_alpha().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-paint-with-alpha
func (*Context) PathExtents ¶
See cairo_path_extents().
C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-path-extents
func (*Context) PopGroup ¶
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 ¶
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 ¶
See cairo_rectangle().
C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-rectangle
func (*Context) RelCurveTo ¶
See cairo_rel_curve_to().
C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-rel-curve-to
func (*Context) RelLineTo ¶
See cairo_rel_line_to().
C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-rel-line-to
func (*Context) RelMoveTo ¶
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 ¶
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 ¶
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 ¶
See cairo_set_antialias().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-antialias
func (*Context) SetDash ¶
See cairo_set_dash().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-dash
func (*Context) SetFillRule ¶
See cairo_set_fill_rule().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-fill-rule
func (*Context) SetFontFace ¶
See cairo_set_font_face().
C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-set-font-face
func (*Context) SetFontMatrix ¶
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 ¶
See cairo_set_font_size().
C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-set-font-size
func (*Context) SetLineCap ¶
See cairo_set_line_cap().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-line-cap
func (*Context) SetLineJoin ¶
See cairo_set_line_join().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-line-join
func (*Context) SetLineWidth ¶
See cairo_set_line_width().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-line-width
func (*Context) SetMatrix ¶
See cairo_set_matrix().
C API documentation: http://cairographics.org/manual/cairo-Transformations.html#cairo-set-matrix
func (*Context) SetMiterLimit ¶
See cairo_set_miter_limit().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-miter-limit
func (*Context) SetOperator ¶
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 ¶
See cairo_set_source().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-source
func (*Context) SetSourceRGB ¶
See cairo_set_source_rgb().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-source-rgb
func (*Context) SetSourceRGBA ¶
See cairo_set_source_rgba().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-source-rgba
func (*Context) SetSourceSurface ¶
See cairo_set_source_surface().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-source-surface
func (*Context) SetTolerance ¶
See cairo_set_tolerance().
C API documentation: http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-tolerance
func (*Context) ShowGlyphs ¶
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 ¶
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 ¶
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 ¶
See cairo_text_path().
C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-text-path
func (*Context) Transform ¶
See cairo_transform().
C API documentation: http://cairographics.org/manual/cairo-Transformations.html#cairo-transform
func (*Context) Translate ¶
See cairo_translate().
C API documentation: http://cairographics.org/manual/cairo-Transformations.html#cairo-translate
func (*Context) UserToDevice ¶
See cairo_user_to_device().
C API documentation: http://cairographics.org/manual/cairo-Transformations.html#cairo-user-to-device
func (*Context) UserToDeviceDistance ¶
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 ¶
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 ¶
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 ¶
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 ¶
See cairo_device_observer_elapsed().
C API documentation: http://cairographics.org/manual/cairo-cairo-device-t.html#cairo-device-observer-elapsed
func (*Device) ObserverFillElapsed ¶
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 ¶
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 ¶
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 ¶
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 ¶
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
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 (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 )
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 )
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 )
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 ¶
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 ¶
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 ¶
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 )
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 )
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 ¶
See cairo_format_stride_for_width().
C API documentation: http://cairographics.org/manual/cairo-Image-Surfaces.html#cairo-format-stride-for-width
type Glyph ¶
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 )
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 )
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 )
type Matrix ¶
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 ¶
See cairo_matrix_init_rotate().
C API documentation: http://cairographics.org/manual/cairo-cairo-matrix-t.html#cairo-matrix-init-rotate
func (*Matrix) InitScale ¶
See cairo_matrix_init_scale().
C API documentation: http://cairographics.org/manual/cairo-cairo-matrix-t.html#cairo-matrix-init-scale
func (*Matrix) InitTranslate ¶
See cairo_matrix_init_translate().
C API documentation: http://cairographics.org/manual/cairo-cairo-matrix-t.html#cairo-matrix-init-translate
func (*Matrix) Invert ¶
See cairo_matrix_invert().
C API documentation: http://cairographics.org/manual/cairo-cairo-matrix-t.html#cairo-matrix-invert
func (*Matrix) Multiply ¶
See cairo_matrix_multiply().
C API documentation: http://cairographics.org/manual/cairo-cairo-matrix-t.html#cairo-matrix-multiply
func (*Matrix) Rotate ¶
See cairo_matrix_rotate().
C API documentation: http://cairographics.org/manual/cairo-cairo-matrix-t.html#cairo-matrix-rotate
func (*Matrix) Scale ¶
See cairo_matrix_scale().
C API documentation: http://cairographics.org/manual/cairo-cairo-matrix-t.html#cairo-matrix-scale
func (*Matrix) TransformDistance ¶
See cairo_matrix_transform_distance().
C API documentation: http://cairographics.org/manual/cairo-cairo-matrix-t.html#cairo-matrix-transform-distance
func (*Matrix) TransformPoint ¶
See cairo_matrix_transform_point().
C API documentation: http://cairographics.org/manual/cairo-cairo-matrix-t.html#cairo-matrix-transform-point
func (*Matrix) Translate ¶
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 )
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 ¶
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.
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
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 (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 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 ¶
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 ¶
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 ¶
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 ¶
See cairo_pattern_create_rgb().
C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-create-rgb
func PatternCreateRGBA ¶
See cairo_pattern_create_rgba().
C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-create-rgba
func PatternCreateRadial ¶
See cairo_pattern_create_radial().
C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-create-radial
func WrapPattern ¶
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 ¶
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 ¶
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 ¶
See cairo_pattern_get_extend().
C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-get-extend
func (*Pattern) GetFilter ¶
See cairo_pattern_get_filter().
C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-get-filter
func (*Pattern) GetMatrix ¶
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 ¶
See cairo_pattern_set_extend().
C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-set-extend
func (*Pattern) SetFilter ¶
See cairo_pattern_set_filter().
C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-set-filter
func (*Pattern) SetMatrix ¶
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 ¶
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 ¶
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 ¶
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 ¶
See cairo_region_contains_point().
C API documentation: http://cairographics.org/manual/cairo-Regions.html#cairo-region-contains-point
func (*Region) Copy ¶
See cairo_region_copy().
C API documentation: http://cairographics.org/manual/cairo-Regions.html#cairo-region-copy
func (*Region) Equal ¶
See cairo_region_equal().
C API documentation: http://cairographics.org/manual/cairo-Regions.html#cairo-region-equal
func (*Region) Intersect ¶
See cairo_region_intersect().
C API documentation: http://cairographics.org/manual/cairo-Regions.html#cairo-region-intersect
func (*Region) IsEmpty ¶
See cairo_region_is_empty().
C API documentation: http://cairographics.org/manual/cairo-Regions.html#cairo-region-is-empty
func (*Region) NumRectangles ¶
See cairo_region_num_rectangles().
C API documentation: http://cairographics.org/manual/cairo-Regions.html#cairo-region-num-rectangles
func (*Region) Subtract ¶
See cairo_region_subtract().
C API documentation: http://cairographics.org/manual/cairo-Regions.html#cairo-region-subtract
func (*Region) Translate ¶
See cairo_region_translate().
C API documentation: http://cairographics.org/manual/cairo-Regions.html#cairo-region-translate
func (*Region) Union ¶
See cairo_region_union().
C API documentation: http://cairographics.org/manual/cairo-Regions.html#cairo-region-union
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 )
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
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 (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 ¶
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 ¶
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 ¶
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 ¶
See cairo_surface_create_similar().
C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-create-similar
func (*Surface) CreateSimilarImage ¶
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 ¶
See cairo_surface_get_content().
C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-get-content
func (*Surface) GetDevice ¶
See cairo_surface_get_device().
C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-get-device
func (*Surface) GetDeviceOffset ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
See cairo_surface_unmap_image().
C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-unmap-image
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
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 (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