Versions in this module Expand all Collapse all v0 v0.4.0 Feb 13, 2020 Changes in this version + func FormatStrideForWidth(format Format, width int) int + func StatusToString(status Status) string + type Antialias int + const ANTIALIAS_DEFAULT + const ANTIALIAS_GRAY + const ANTIALIAS_NONE + const ANTIALIAS_SUBPIXEL + type Content int + const CONTENT_ALPHA + const CONTENT_COLOR + const CONTENT_COLOR_ALPHA + type Context struct + func Create(target *Surface) *Context + func WrapContext(p uintptr) *Context + func (v *Context) Arc(xc, yc, radius, angle1, angle2 float64) + func (v *Context) ArcNegative(xc, yc, radius, angle1, angle2 float64) + func (v *Context) Clip() + func (v *Context) ClipExtents() (x1, y1, x2, y2 float64) + func (v *Context) ClipPreserve() + func (v *Context) Close() + func (v *Context) ClosePath() + func (v *Context) CopyPage() + func (v *Context) CurveTo(x1, y1, x2, y2, x3, y3 float64) + func (v *Context) DeviceToUser(x, y float64) (float64, float64) + func (v *Context) DeviceToUserDistance(x, y float64) (float64, float64) + func (v *Context) Fill() + func (v *Context) FillExtents() (x1, y1, x2, y2 float64) + func (v *Context) FillPreserve() + func (v *Context) FontExtents() FontExtents + func (v *Context) GetAntialias() Antialias + func (v *Context) GetCContext() *C.cairo_t + func (v *Context) GetCurrentPoint() (x, y float64) + func (v *Context) GetDash() (dashes []float64, offset float64) + func (v *Context) GetDashCount() int + func (v *Context) GetFillRule() FillRule + func (v *Context) GetGroupTarget() *Surface + func (v *Context) GetLineCap() LineCap + func (v *Context) GetLineJoin() LineJoin + func (v *Context) GetLineWidth() float64 + func (v *Context) GetMatrix() *Matrix + func (v *Context) GetMiterLimit() float64 + func (v *Context) GetOperator() Operator + func (v *Context) GetTarget() *Surface + func (v *Context) GetTolerance() float64 + func (v *Context) IdentityMatrix() + func (v *Context) InClip(x, y float64) bool + func (v *Context) InFill(x, y float64) bool + func (v *Context) InStroke(x, y float64) bool + func (v *Context) LineTo(x, y float64) + func (v *Context) MaskSurface(surface *Surface, surfaceX, surfaceY float64) + func (v *Context) MoveTo(x, y float64) + func (v *Context) Native() uintptr + func (v *Context) NewPath() + func (v *Context) Paint() + func (v *Context) PaintWithAlpha(alpha float64) + func (v *Context) PopGroupToSource() + func (v *Context) PushGroup() + func (v *Context) PushGroupWithContent(content Content) + func (v *Context) Rectangle(x, y, w, h float64) + func (v *Context) ResetClip() + func (v *Context) Restore() + func (v *Context) Rotate(angle float64) + func (v *Context) Save() + func (v *Context) Scale(sx, sy float64) + func (v *Context) SelectFontFace(family string, slant FontSlant, weight FontWeight) + func (v *Context) SetAntialias(antialias Antialias) + func (v *Context) SetDash(dashes []float64, offset float64) + func (v *Context) SetFillRule(fillRule FillRule) + func (v *Context) SetFontSize(size float64) + func (v *Context) SetLineCap(lineCap LineCap) + func (v *Context) SetLineJoin(lineJoin LineJoin) + func (v *Context) SetLineWidth(width float64) + func (v *Context) SetMatrix(matrix *Matrix) + func (v *Context) SetMiterLimit(limit float64) + func (v *Context) SetOperator(op Operator) + func (v *Context) SetSource(p *Pattern) + func (v *Context) SetSourceRGB(red, green, blue float64) + func (v *Context) SetSourceRGBA(red, green, blue, alpha float64) + func (v *Context) SetSourceSurface(surface *Surface, x, y float64) + func (v *Context) SetTolerance(tolerance float64) + func (v *Context) ShowPage() + func (v *Context) ShowText(utf8 string) + func (v *Context) Status() Status + func (v *Context) Stroke() + func (v *Context) StrokeExtents() (x1, y1, x2, y2 float64) + func (v *Context) StrokePreserve() + func (v *Context) TextExtents(utf8 string) TextExtents + func (v *Context) Transform(matrix *Matrix) + func (v *Context) Translate(tx, ty float64) + func (v *Context) UserToDevice(x, y float64) (float64, float64) + func (v *Context) UserToDeviceDistance(dx, dy float64) (float64, float64) + type ErrorStatus Status + func (e ErrorStatus) Error() string + type FillRule int + const FILL_RULE_EVEN_ODD + const FILL_RULE_WINDING + type FontExtents struct + Ascent float64 + Descent float64 + Height float64 + MaxXAdvance float64 + MaxYAdvance float64 + type FontSlant int + const FONT_SLANT_ITALIC + const FONT_SLANT_NORMAL + const FONT_SLANT_OBLIQUE + type FontWeight int + const FONT_WEIGHT_BOLD + const FONT_WEIGHT_NORMAL + type Format int + const FORMAT_A1 + const FORMAT_A8 + const FORMAT_ARGB32 + const FORMAT_INVALID + const FORMAT_RGB16_565 + const FORMAT_RGB24 + const FORMAT_RGB30 + type LineCap int + const LINE_CAP_BUTT + const LINE_CAP_ROUND + const LINE_CAP_SQUARE + type LineJoin int + const LINE_JOIN_BEVEL + const LINE_JOIN_MITER + const LINE_JOIN_ROUND + type Matrix struct + X0 float64 + Xx float64 + Xy float64 + Y0 float64 + Yx float64 + Yy float64 + func NewMatrix(xx, yx, xy, yy, x0, y0 float64) *Matrix + func (m *Matrix) InitIdentity() + func (m *Matrix) InitRotate(radians float64) + func (m *Matrix) InitScale(sx, sy float64) + func (m *Matrix) InitTranslate(tx, ty float64) + func (m *Matrix) Invert() + func (m *Matrix) Multiply(a, b Matrix) + func (m *Matrix) Native() uintptr + func (m *Matrix) Rotate(radians float64) + func (m *Matrix) Scale(sx, sy float64) + func (m *Matrix) TransformDistance(dx, dy float64) (float64, float64) + func (m *Matrix) TransformPoint(x, y float64) (float64, float64) + func (m *Matrix) Translate(tx, ty float64) + type MimeType string + const MIME_TYPE_JP2 + const MIME_TYPE_JPEG + const MIME_TYPE_PNG + const MIME_TYPE_UNIQUE_ID + const MIME_TYPE_URI + type Operator int + const OPERATOR_ADD + const OPERATOR_ATOP + const OPERATOR_CLEAR + const OPERATOR_COLOR_BURN + const OPERATOR_COLOR_DODGE + const OPERATOR_DARKEN + const OPERATOR_DEST + const OPERATOR_DEST_ATOP + const OPERATOR_DEST_IN + const OPERATOR_DEST_OUT + const OPERATOR_DEST_OVER + const OPERATOR_DIFFERENCE + const OPERATOR_EXCLUSION + const OPERATOR_HARD_LIGHT + const OPERATOR_HSL_COLOR + const OPERATOR_HSL_HUE + const OPERATOR_HSL_LUMINOSITY + const OPERATOR_HSL_SATURATION + const OPERATOR_IN + const OPERATOR_LIGHTEN + const OPERATOR_MULTIPLY + const OPERATOR_OUT + const OPERATOR_OVER + const OPERATOR_OVERLAY + const OPERATOR_SATURATE + const OPERATOR_SCREEN + const OPERATOR_SOFT_LIGHT + const OPERATOR_SOURCE + const OPERATOR_XOR + type Pattern struct + func NewPatternForSurface(s *Surface) (*Pattern, error) + func NewPatternFromRGB(red, green, blue float64) (*Pattern, error) + func NewPatternFromRGBA(red, green, blue, alpha float64) (*Pattern, error) + func NewPatternLinear(x0, y0, x1, y1 float64) (*Pattern, error) + func NewPatternRadial(x0, y0, r0, x1, y1, r1 float64) (*Pattern, error) + func (v *Pattern) AddColorStopRGB(offset, red, green, blue float64) error + func (v *Pattern) AddColorStopRGBA(offset, red, green, blue, alpha float64) error + func (v *Pattern) Native() uintptr + func (v *Pattern) Status() Status + type Status int + const STATUS_CLIP_NOT_REPRESENTABLE + const STATUS_DEVICE_ERROR + const STATUS_DEVICE_TYPE_MISMATCH + const STATUS_FILE_NOT_FOUND + const STATUS_FONT_TYPE_MISMATCH + const STATUS_INVALID_CLUSTERS + const STATUS_INVALID_CONTENT + const STATUS_INVALID_DASH + const STATUS_INVALID_DSC_COMMENT + const STATUS_INVALID_FORMAT + const STATUS_INVALID_INDEX + const STATUS_INVALID_MATRIX + const STATUS_INVALID_PATH_DATA + const STATUS_INVALID_POP_GROUP + const STATUS_INVALID_RESTORE + const STATUS_INVALID_SIZE + const STATUS_INVALID_SLANT + const STATUS_INVALID_STATUS + const STATUS_INVALID_STRIDE + const STATUS_INVALID_STRING + const STATUS_INVALID_VISUAL + const STATUS_INVALID_WEIGHT + const STATUS_NEGATIVE_COUNT + const STATUS_NO_CURRENT_POINT + const STATUS_NO_MEMORY + const STATUS_NULL_POINTER + const STATUS_PATTERN_TYPE_MISMATCH + const STATUS_READ_ERROR + const STATUS_SUCCESS + const STATUS_SURFACE_FINISHED + const STATUS_SURFACE_TYPE_MISMATCH + const STATUS_TEMP_FILE_ERROR + const STATUS_USER_FONT_ERROR + const STATUS_USER_FONT_IMMUTABLE + const STATUS_USER_FONT_NOT_IMPLEMENTED + const STATUS_WRITE_ERROR + func (s Status) String() string + func (s Status) ToError() error + type Surface struct + func CreateImageSurface(format Format, width, height int) *Surface + func CreateImageSurfaceForData(data []byte, format Format, width, height, stride int) (*Surface, error) + func CreatePDFSurface(fileName string, width float64, height float64) (*Surface, error) + func NewSurface(s uintptr, needsRef bool) *Surface + func NewSurfaceFromPNG(fileName string) (*Surface, error) + func WrapSurface(s uintptr) *Surface + func (v *Surface) Close() + func (v *Surface) CopyPage() + func (v *Surface) CreateForRectangle(x, y, width, height float64) *Surface + func (v *Surface) CreateSimilar(content Content, width, height int) *Surface + func (v *Surface) Flush() + func (v *Surface) GetData() unsafe.Pointer + func (v *Surface) GetDeviceOffset() (x, y float64) + func (v *Surface) GetFallbackResolution() (xPPI, yPPI float64) + func (v *Surface) GetHeight() int + func (v *Surface) GetMimeData(mimeType MimeType) []byte + func (v *Surface) GetType() SurfaceType + func (v *Surface) GetWidth() int + func (v *Surface) HasShowTextGlyphs() bool + func (v *Surface) MarkDirty() + func (v *Surface) MarkDirtyRectangle(x, y, width, height int) + func (v *Surface) Native() uintptr + func (v *Surface) SetDeviceOffset(x, y float64) + func (v *Surface) SetFallbackResolution(xPPI, yPPI float64) + func (v *Surface) ShowPage() + func (v *Surface) Status() Status + func (v *Surface) WriteToPNG(fileName string) error + type SurfaceType int + const SURFACE_TYPE_BEOS + const SURFACE_TYPE_DIRECTFB + const SURFACE_TYPE_DRM + const SURFACE_TYPE_GL + const SURFACE_TYPE_GLITZ + const SURFACE_TYPE_IMAGE + const SURFACE_TYPE_OS2 + const SURFACE_TYPE_PDF + const SURFACE_TYPE_PS + const SURFACE_TYPE_QT + const SURFACE_TYPE_QUARTZ + const SURFACE_TYPE_QUARTZ_IMAGE + const SURFACE_TYPE_RECORDING + const SURFACE_TYPE_SCRIPT + const SURFACE_TYPE_SKIA + const SURFACE_TYPE_SUBSURFACE + const SURFACE_TYPE_SVG + const SURFACE_TYPE_TEE + const SURFACE_TYPE_VG + const SURFACE_TYPE_WIN32 + const SURFACE_TYPE_WIN32_PRINTING + const SURFACE_TYPE_XCB + const SURFACE_TYPE_XLIB + const SURFACE_TYPE_XML + type TextExtents struct + Height float64 + Width float64 + XAdvance float64 + XBearing float64 + YAdvance float64 + YBearing float64