Documentation ¶
Index ¶
- type Canvas
- func (c *Canvas) Clear(r, g, b, a uint8)
- func (c *Canvas) Concat(m Matrix)
- func (c *Canvas) DrawPath(path *Path, paint *Paint)
- func (c *Canvas) DrawRect(x, y, w, h float32, paint *Paint)
- func (c *Canvas) Flush()
- func (c *Canvas) Restore()
- func (c *Canvas) Save()
- func (c *Canvas) Scale(sx, sy float32)
- func (c *Canvas) SetMatrix(m Matrix)
- func (c *Canvas) TotalMatrix() Matrix
- func (c *Canvas) Translate(dx, dy float32)
- type Context
- func (c *Context) Dispose() error
- func (c *Context) InverseMatrix(m Matrix) (Matrix, bool)
- func (c *Context) NewPaint() *Paint
- func (c *Context) NewPath() *Path
- func (c *Context) NewRGBAPremultipliedSurface(width, height int) *Surface
- func (c *Context) NewRGBASurface(width, height int) *Surface
- func (c *Context) StackAllocPaint() (paint *Paint, dispose func())
- func (c *Context) StackAllocPath() (path *Path, dispose func())
- func (c *Context) SurfaceIsBGRA() bool
- type Matrix
- type Paint
- func (p *Paint) Alpha() uint8
- func (p *Paint) Color() uint32
- func (p *Paint) Dispose()
- func (p *Paint) IsAntiAlias() bool
- func (p *Paint) Reset()
- func (p *Paint) SetAlpha(a uint8)
- func (p *Paint) SetAntiAlias(aa bool)
- func (p *Paint) SetColor(r, g, b, a uint8)
- func (p *Paint) SetStrokeCap(c StrokeCap)
- func (p *Paint) SetStrokeJoin(j StrokeJoin)
- func (p *Paint) SetStrokeMiter(m float32)
- func (p *Paint) SetStrokeWidth(w float32)
- func (p *Paint) SetStyle(s PaintStyle)
- func (p *Paint) StrokeCap() StrokeCap
- func (p *Paint) StrokeJoin() StrokeJoin
- func (p *Paint) StrokeMiter() float32
- func (p *Paint) StrokeWidth() float32
- func (p *Paint) Style() PaintStyle
- type PaintStyle
- type Path
- func (p *Path) Bounds() Rect
- func (p *Path) Close()
- func (p *Path) ComputeTightBounds() Rect
- func (p *Path) ConicTo(x1, y1, x2, y2, weight float32)
- func (p *Path) CubicTo(x1, y1, x2, y2, x3, y3 float32)
- func (p *Path) Dispose()
- func (p *Path) FillType() PathFillType
- func (p *Path) LineTo(x, y float32)
- func (p *Path) MoveTo(x, y float32)
- func (p *Path) NumPoints() int
- func (p *Path) NumVerbs() int
- func (p *Path) Point(idx int) Point
- func (p *Path) Points(peek bool) []Point
- func (p *Path) QuadTo(x1, y1, x2, y2 float32)
- func (p *Path) Reset()
- func (p *Path) Rewind()
- func (p *Path) SetFillType(ft PathFillType)
- func (p *Path) Verbs(peek bool) []PathVerb
- type PathFillType
- type PathVerb
- type Point
- type Rect
- type StrokeCap
- type StrokeJoin
- type Surface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Canvas ¶
type Canvas struct {
// contains filtered or unexported fields
}
func (*Canvas) TotalMatrix ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func NewContext ¶
func NewContext() *Context
func (*Context) NewRGBAPremultipliedSurface ¶
func (*Context) NewRGBASurface ¶
func (*Context) StackAllocPaint ¶
func (*Context) StackAllocPath ¶
func (*Context) SurfaceIsBGRA ¶
type Matrix ¶
type Matrix struct { ScaleX float32 SkewX float32 TransX float32 SkewY float32 ScaleY float32 TransY float32 }
func IdentityMatrix ¶
func IdentityMatrix() Matrix
type Paint ¶
type Paint struct {
// contains filtered or unexported fields
}
func (*Paint) IsAntiAlias ¶
func (*Paint) SetAntiAlias ¶
func (*Paint) SetStrokeCap ¶
func (*Paint) SetStrokeJoin ¶
func (p *Paint) SetStrokeJoin(j StrokeJoin)
func (*Paint) SetStrokeMiter ¶
func (*Paint) SetStrokeWidth ¶
func (*Paint) SetStyle ¶
func (p *Paint) SetStyle(s PaintStyle)
func (*Paint) StrokeJoin ¶
func (p *Paint) StrokeJoin() StrokeJoin
func (*Paint) StrokeMiter ¶
func (*Paint) StrokeWidth ¶
func (*Paint) Style ¶
func (p *Paint) Style() PaintStyle
type PaintStyle ¶
type PaintStyle uint8
const ( PaintStyleFill PaintStyle = iota PaintStyleStroke PaintStyleStrokeAndFill )
type Path ¶
type Path struct {
// contains filtered or unexported fields
}
func (*Path) ComputeTightBounds ¶
func (*Path) FillType ¶
func (p *Path) FillType() PathFillType
func (*Path) SetFillType ¶
func (p *Path) SetFillType(ft PathFillType)
type PathFillType ¶
type PathFillType uint8
const ( PathFillTypeWinding PathFillType = iota PathFillTypeEvenOdd )
type StrokeJoin ¶
type StrokeJoin uint8
const ( StrokeJoinMiter StrokeJoin = iota StrokeJoinRound StrokeJoinBevel )
Source Files ¶
Click to show internal directories.
Click to hide internal directories.