Documentation
¶
Index ¶
- type Antialias
- type Canvas
- func (c *Canvas) Arc(xc, yc, radius, angle1, angle2 float64)
- func (c *Canvas) ArcNegative(xc, yc, radius, angle1, angle2 float64)
- func (c *Canvas) Circle(xc, yc float64, radius float64)
- func (c *Canvas) Clip()
- func (c *Canvas) ClipPreserve()
- func (c *Canvas) ClosePath()
- func (c *Canvas) CopyPage()
- func (c *Canvas) CurveTo(x1, y1, x2, y2, x3, y3 float64)
- func (c *Canvas) Destroy()
- func (c *Canvas) Fill()
- func (c *Canvas) FillColor(cr color.Color)
- func (c *Canvas) FillPreserve()
- func (c *Canvas) GetAntialias() Antialias
- func (c *Canvas) GetDashCount() int
- func (c *Canvas) GetFillRule() FillRule
- func (c *Canvas) GetGroupTarget() *Surface
- func (c *Canvas) GetLineCap() LineCap
- func (c *Canvas) GetLineJoin() LineJoin
- func (c *Canvas) GetLineWidth() float64
- func (c *Canvas) GetMatrix(matrix *Matrix)
- func (c *Canvas) GetMiterLimit() float64
- func (c *Canvas) GetOperator() Operator
- func (c *Canvas) GetReferenceCount() uint
- func (c *Canvas) GetSource() *Pattern
- func (c *Canvas) GetTarget() *Surface
- func (c *Canvas) GetTolerance() float64
- func (c *Canvas) IdentityMatrix()
- func (c *Canvas) InClip(x, y float64) bool
- func (c *Canvas) InFill(x, y float64) bool
- func (c *Canvas) InStroke(x, y float64) bool
- func (c *Canvas) LineTo(x, y float64)
- func (c *Canvas) MoveTo(x, y float64)
- func (c *Canvas) Native() uintptr
- func (c *Canvas) NewPath()
- func (c *Canvas) NewSubPath()
- func (c *Canvas) Paint()
- func (c *Canvas) PaintWithAlpha(alpha float64)
- func (c *Canvas) PushGroup()
- func (c *Canvas) PushGroupWithContent(content Content)
- func (c *Canvas) Rectangle(x, y, width, height float64)
- func (c *Canvas) Reference() *Canvas
- func (c *Canvas) RelLineTo(dx, dy float64)
- func (c *Canvas) ResetClip()
- func (c *Canvas) Restore()
- func (c *Canvas) Rotate(angle float64)
- func (c *Canvas) Save()
- func (c *Canvas) Scale(sx, sy float64)
- func (c *Canvas) SelectFontFace(family string, fontSlant FontSlant, fontWeight FontWeight)
- func (c *Canvas) SetAntialias(antialias Antialias)
- func (c *Canvas) SetDash(dashes []float64, offset float64)
- func (c *Canvas) SetFillRule(fillRule FillRule)
- func (c *Canvas) SetFontSize(size float64)
- func (c *Canvas) SetLineCap(lineCap LineCap)
- func (c *Canvas) SetLineJoin(lineJoin LineJoin)
- func (c *Canvas) SetLineWidth(width float64)
- func (c *Canvas) SetMatrix(matrix *Matrix)
- func (c *Canvas) SetMiterLimit(limit float64)
- func (c *Canvas) SetOperator(operator Operator)
- func (c *Canvas) SetSource(p *Pattern)
- func (c *Canvas) SetSourceColor(cr color.Color)
- func (c *Canvas) SetSourceRGB(red, green, blue float64)
- func (c *Canvas) SetSourceRGBA(red, green, blue, alpha float64)
- func (c *Canvas) SetSourceSurface(s *Surface, x, y float64)
- func (c *Canvas) SetTolerance(tolerance float64)
- func (c *Canvas) ShowPage()
- func (c *Canvas) ShowText(text string)
- func (c *Canvas) Status() Status
- func (c *Canvas) Stroke()
- func (c *Canvas) StrokePreserve()
- func (c *Canvas) TextExtents(text string, textExtents *TextExtents)
- func (c *Canvas) TextPath(text string)
- func (c *Canvas) Transform(matrix *Matrix)
- func (c *Canvas) Translate(tx, ty float64)
- type Content
- type Extend
- type FillRule
- type FontSlant
- type FontWeight
- type Format
- type LineCap
- type LineJoin
- type Matrix
- func (m *Matrix) Init(xx, yx, xy, yy, x0, y0 float64)
- func (m *Matrix) InitIdendity()
- func (m *Matrix) InitRotate(radians float64)
- func (m *Matrix) InitScale(sx, sy float64)
- func (m *Matrix) InitTranslate(tx, ty float64)
- func (m *Matrix) Invert() Status
- func (m *Matrix) Multiply(a, b *Matrix)
- 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 Operator
- type Pattern
- func (p *Pattern) AddColorStopRGB(offset, red, green, blue float64)
- func (p *Pattern) AddColorStopRGBA(offset, red, green, blue, alpha float64)
- func (p *Pattern) Destroy()
- func (p *Pattern) Native() uintptr
- func (p *Pattern) Reference() *Pattern
- func (p *Pattern) SetExtend(extend Extend)
- func (p *Pattern) SetMatrix(m *Matrix)
- type Status
- type Surface
- func (s *Surface) Destroy()
- func (s *Surface) Finish()
- func (s *Surface) Flush()
- func (s *Surface) GetData(data []byte) error
- func (s *Surface) GetDataLength() int
- func (s *Surface) GetFormat() Format
- func (s *Surface) GetHeight() int
- func (s *Surface) GetStride() int
- func (s *Surface) GetWidth() int
- func (s *Surface) MarkDirty()
- func (s *Surface) Native() uintptr
- func (s *Surface) Reference() *Surface
- func (s *Surface) SetData(data []byte) error
- func (s *Surface) WriteToPNG(fileName string) error
- type TextExtents
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Antialias ¶
type Antialias int // cairo_antialias_t
const ( ANTIALIAS_DEFAULT Antialias = C.CAIRO_ANTIALIAS_DEFAULT ANTIALIAS_NONE Antialias = C.CAIRO_ANTIALIAS_NONE ANTIALIAS_GRAY Antialias = C.CAIRO_ANTIALIAS_GRAY ANTIALIAS_SUBPIXEL Antialias = C.CAIRO_ANTIALIAS_SUBPIXEL ANTIALIAS_FAST Antialias = C.CAIRO_ANTIALIAS_FAST ANTIALIAS_GOOD Antialias = C.CAIRO_ANTIALIAS_GOOD ANTIALIAS_BEST Antialias = C.CAIRO_ANTIALIAS_BEST )
type Canvas ¶
type Canvas struct {
// contains filtered or unexported fields
}
func NewCanvasNative ¶
func (*Canvas) ArcNegative ¶
func (*Canvas) ClipPreserve ¶
func (c *Canvas) ClipPreserve()
func (*Canvas) FillPreserve ¶
func (c *Canvas) FillPreserve()
func (*Canvas) GetAntialias ¶
func (*Canvas) GetDashCount ¶
func (*Canvas) GetFillRule ¶
func (*Canvas) GetGroupTarget ¶
func (*Canvas) GetLineCap ¶
func (*Canvas) GetLineJoin ¶
func (*Canvas) GetLineWidth ¶
func (*Canvas) GetMiterLimit ¶
func (*Canvas) GetOperator ¶
func (*Canvas) GetReferenceCount ¶
func (*Canvas) GetTolerance ¶
func (*Canvas) IdentityMatrix ¶
func (c *Canvas) IdentityMatrix()
func (*Canvas) NewSubPath ¶
func (c *Canvas) NewSubPath()
func (*Canvas) PaintWithAlpha ¶
func (*Canvas) PushGroupWithContent ¶
func (*Canvas) SelectFontFace ¶
func (c *Canvas) SelectFontFace(family string, fontSlant FontSlant, fontWeight FontWeight)
func (*Canvas) SetAntialias ¶
func (*Canvas) SetFillRule ¶
func (*Canvas) SetFontSize ¶
func (*Canvas) SetLineCap ¶
func (*Canvas) SetLineJoin ¶
func (*Canvas) SetLineWidth ¶
func (*Canvas) SetMiterLimit ¶
func (*Canvas) SetOperator ¶
func (*Canvas) SetSourceColor ¶
------------------------------------------------------------------------------
func (*Canvas) SetSourceRGB ¶
func (*Canvas) SetSourceRGBA ¶
func (*Canvas) SetSourceSurface ¶
func (*Canvas) SetTolerance ¶
func (*Canvas) StrokePreserve ¶
func (c *Canvas) StrokePreserve()
func (*Canvas) TextExtents ¶
func (c *Canvas) TextExtents(text string, textExtents *TextExtents)
type Content ¶
type Content int // cairo_content_t
const ( CONTENT_COLOR Content = C.CAIRO_CONTENT_COLOR CONTENT_ALPHA Content = C.CAIRO_CONTENT_ALPHA CONTENT_COLOR_ALPHA Content = C.CAIRO_CONTENT_COLOR_ALPHA )
type Extend ¶
type Extend int // cairo_extend_t
const ( EXTEND_NONE Extend = C.CAIRO_EXTEND_NONE EXTEND_REPEAT Extend = C.CAIRO_EXTEND_REPEAT EXTEND_REFLECT Extend = C.CAIRO_EXTEND_REFLECT EXTEND_PAD Extend = C.CAIRO_EXTEND_PAD )
type FillRule ¶
type FillRule int // cairo_fill_rule_t
const ( FILL_RULE_WINDING FillRule = C.CAIRO_FILL_RULE_WINDING FILL_RULE_EVEN_ODD FillRule = C.CAIRO_FILL_RULE_EVEN_ODD )
type FontSlant ¶
type FontSlant int // cairo_font_slant_t
const ( FONT_SLANT_NORMAL FontSlant = C.CAIRO_FONT_SLANT_NORMAL FONT_SLANT_ITALIC FontSlant = C.CAIRO_FONT_SLANT_ITALIC FONT_SLANT_OBLIQUE FontSlant = C.CAIRO_FONT_SLANT_OBLIQUE )
type FontWeight ¶
type FontWeight int // cairo_font_weight_t
const ( FONT_WEIGHT_NORMAL FontWeight = C.CAIRO_FONT_WEIGHT_NORMAL FONT_WEIGHT_BOLD FontWeight = C.CAIRO_FONT_WEIGHT_BOLD )
type Format ¶
type Format int // cairo_format_t
const ( FORMAT_INVALID Format = C.CAIRO_FORMAT_INVALID FORMAT_ARGB32 Format = C.CAIRO_FORMAT_ARGB32 FORMAT_RGB24 Format = C.CAIRO_FORMAT_RGB24 FORMAT_A8 Format = C.CAIRO_FORMAT_A8 FORMAT_A1 Format = C.CAIRO_FORMAT_A1 FORMAT_RGB16_565 Format = C.CAIRO_FORMAT_RGB16_565 FORMAT_RGB30 Format = C.CAIRO_FORMAT_RGB30 )
type LineCap ¶
type LineCap int // cairo_line_cap_t
const ( LINE_CAP_BUTT LineCap = C.CAIRO_LINE_CAP_BUTT LINE_CAP_ROUND LineCap = C.CAIRO_LINE_CAP_ROUND LINE_CAP_SQUARE LineCap = C.CAIRO_LINE_CAP_SQUARE )
type LineJoin ¶
type LineJoin int // cairo_line_join_t
const ( LINE_JOIN_MITER LineJoin = C.CAIRO_LINE_JOIN_MITER LINE_JOIN_ROUND LineJoin = C.CAIRO_LINE_JOIN_ROUND LINE_JOIN_BEVEL LineJoin = C.CAIRO_LINE_JOIN_BEVEL )
type Matrix ¶
type Matrix struct {
// contains filtered or unexported fields
}
func (*Matrix) InitIdendity ¶
func (m *Matrix) InitIdendity()
func (*Matrix) InitRotate ¶
func (*Matrix) InitTranslate ¶
func (*Matrix) TransformDistance ¶
type Operator ¶
type Operator int // cairo_operator_t
const ( OPERATOR_CLEAR Operator = C.CAIRO_OPERATOR_CLEAR OPERATOR_SOURCE Operator = C.CAIRO_OPERATOR_SOURCE OPERATOR_OVER Operator = C.CAIRO_OPERATOR_OVER OPERATOR_IN Operator = C.CAIRO_OPERATOR_IN OPERATOR_OUT Operator = C.CAIRO_OPERATOR_OUT OPERATOR_ATOP Operator = C.CAIRO_OPERATOR_ATOP OPERATOR_DEST Operator = C.CAIRO_OPERATOR_DEST OPERATOR_DEST_OVER Operator = C.CAIRO_OPERATOR_DEST_OVER OPERATOR_DEST_IN Operator = C.CAIRO_OPERATOR_DEST_IN OPERATOR_DEST_OUT Operator = C.CAIRO_OPERATOR_DEST_OUT OPERATOR_DEST_ATOP Operator = C.CAIRO_OPERATOR_DEST_ATOP OPERATOR_XOR Operator = C.CAIRO_OPERATOR_XOR OPERATOR_ADD Operator = C.CAIRO_OPERATOR_ADD OPERATOR_SATURATE Operator = C.CAIRO_OPERATOR_SATURATE OPERATOR_MULTIPLY Operator = C.CAIRO_OPERATOR_MULTIPLY OPERATOR_SCREEN Operator = C.CAIRO_OPERATOR_SCREEN OPERATOR_OVERLAY Operator = C.CAIRO_OPERATOR_OVERLAY OPERATOR_DARKEN Operator = C.CAIRO_OPERATOR_DARKEN OPERATOR_LIGHTEN Operator = C.CAIRO_OPERATOR_LIGHTEN OPERATOR_COLOR_DODGE Operator = C.CAIRO_OPERATOR_COLOR_DODGE OPERATOR_COLOR_BURN Operator = C.CAIRO_OPERATOR_COLOR_BURN OPERATOR_HARD_LIGHT Operator = C.CAIRO_OPERATOR_HARD_LIGHT OPERATOR_SOFT_LIGHT Operator = C.CAIRO_OPERATOR_SOFT_LIGHT OPERATOR_DIFFERENCE Operator = C.CAIRO_OPERATOR_DIFFERENCE OPERATOR_EXCLUSION Operator = C.CAIRO_OPERATOR_EXCLUSION OPERATOR_HSL_HUE Operator = C.CAIRO_OPERATOR_HSL_HUE OPERATOR_HSL_SATURATION Operator = C.CAIRO_OPERATOR_HSL_SATURATION OPERATOR_HSL_COLOR Operator = C.CAIRO_OPERATOR_HSL_COLOR OPERATOR_HSL_LUMINOSITY Operator = C.CAIRO_OPERATOR_HSL_LUMINOSITY )
type Pattern ¶
type Pattern struct {
// contains filtered or unexported fields
}
func NewPatternForSurface ¶
func NewPatternLinear ¶
func NewPatternNative ¶
func NewPatternRadial ¶
func (*Pattern) AddColorStopRGB ¶
func (*Pattern) AddColorStopRGBA ¶
type Status ¶
type Status int // cairo_status_t
const ( STATUS_SUCCESS Status = C.CAIRO_STATUS_SUCCESS STATUS_NO_MEMORY Status = C.CAIRO_STATUS_NO_MEMORY STATUS_INVALID_RESTORE Status = C.CAIRO_STATUS_INVALID_RESTORE STATUS_INVALID_POP_GROUP Status = C.CAIRO_STATUS_INVALID_POP_GROUP STATUS_NO_CURRENT_POINT Status = C.CAIRO_STATUS_NO_CURRENT_POINT STATUS_INVALID_MATRIX Status = C.CAIRO_STATUS_INVALID_MATRIX STATUS_INVALID_STATUS Status = C.CAIRO_STATUS_INVALID_STATUS STATUS_NULL_POINTER Status = C.CAIRO_STATUS_NULL_POINTER STATUS_INVALID_STRING Status = C.CAIRO_STATUS_INVALID_STRING STATUS_INVALID_PATH_DATA Status = C.CAIRO_STATUS_INVALID_PATH_DATA STATUS_READ_ERROR Status = C.CAIRO_STATUS_READ_ERROR STATUS_WRITE_ERROR Status = C.CAIRO_STATUS_WRITE_ERROR STATUS_SURFACE_FINISHED Status = C.CAIRO_STATUS_SURFACE_FINISHED STATUS_SURFACE_TYPE_MISMATCH Status = C.CAIRO_STATUS_SURFACE_TYPE_MISMATCH STATUS_PATTERN_TYPE_MISMATCH Status = C.CAIRO_STATUS_PATTERN_TYPE_MISMATCH STATUS_INVALID_CONTENT Status = C.CAIRO_STATUS_INVALID_CONTENT STATUS_INVALID_FORMAT Status = C.CAIRO_STATUS_INVALID_FORMAT STATUS_INVALID_VISUAL Status = C.CAIRO_STATUS_INVALID_VISUAL STATUS_FILE_NOT_FOUND Status = C.CAIRO_STATUS_FILE_NOT_FOUND STATUS_INVALID_DASH Status = C.CAIRO_STATUS_INVALID_DASH STATUS_INVALID_DSC_COMMENT Status = C.CAIRO_STATUS_INVALID_DSC_COMMENT STATUS_INVALID_INDEX Status = C.CAIRO_STATUS_INVALID_INDEX STATUS_CLIP_NOT_REPRESENTABLE Status = C.CAIRO_STATUS_CLIP_NOT_REPRESENTABLE STATUS_TEMP_FILE_ERROR Status = C.CAIRO_STATUS_TEMP_FILE_ERROR STATUS_INVALID_STRIDE Status = C.CAIRO_STATUS_INVALID_STRIDE STATUS_FONT_TYPE_MISMATCH Status = C.CAIRO_STATUS_FONT_TYPE_MISMATCH STATUS_USER_FONT_IMMUTABLE Status = C.CAIRO_STATUS_USER_FONT_IMMUTABLE STATUS_USER_FONT_ERROR Status = C.CAIRO_STATUS_USER_FONT_ERROR STATUS_NEGATIVE_COUNT Status = C.CAIRO_STATUS_NEGATIVE_COUNT STATUS_INVALID_CLUSTERS Status = C.CAIRO_STATUS_INVALID_CLUSTERS STATUS_INVALID_SLANT Status = C.CAIRO_STATUS_INVALID_SLANT STATUS_INVALID_WEIGHT Status = C.CAIRO_STATUS_INVALID_WEIGHT STATUS_INVALID_SIZE Status = C.CAIRO_STATUS_INVALID_SIZE STATUS_USER_FONT_NOT_IMPLEMENTED Status = C.CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED STATUS_DEVICE_TYPE_MISMATCH Status = C.CAIRO_STATUS_DEVICE_TYPE_MISMATCH STATUS_DEVICE_ERROR Status = C.CAIRO_STATUS_DEVICE_ERROR )
type Surface ¶
type Surface struct {
// contains filtered or unexported fields
}
func CreateSurfaceForData ¶
func NewSurfaceFromPNG ¶
func NewSurfaceNative ¶
func (*Surface) GetDataLength ¶
func (*Surface) WriteToPNG ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.