Documentation
¶
Rendered for js/wasm
Overview ¶
Package path2d provides retained canvas paths with an API mirroring the browser's Path2D object. Paths are recorded in WASM and materialized in JavaScript only when first drawn.
Index ¶
- type Path2D
- func (p *Path2D) Arc(x, y, radius, startAngle, endAngle float64, counterclockwise ...bool) (self *Path2D)
- func (p *Path2D) ArcTo(x1, y1, x2, y2, radius float64) (self *Path2D)
- func (p *Path2D) BezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y float64) (self *Path2D)
- func (p *Path2D) ClosePath() (self *Path2D)
- func (p *Path2D) CommandBytes() []byte
- func (p *Path2D) Ellipse(x, y, radiusX, radiusY, rotation, startAngle, endAngle float64, ...) (self *Path2D)
- func (p *Path2D) Generate(fn func(self *Path2D)) (self *Path2D)
- func (p *Path2D) ID() uint32
- func (p *Path2D) LineTo(x, y float64) (self *Path2D)
- func (p *Path2D) MoveTo(x, y float64) (self *Path2D)
- func (p *Path2D) QuadraticCurveTo(cpx, cpy, x, y float64) (self *Path2D)
- func (p *Path2D) Rect(x, y, width, height float64) (self *Path2D)
- func (p *Path2D) RoundRect(x, y, width, height, radius float64) (self *Path2D)
- func (p *Path2D) Version() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Path2D ¶
type Path2D struct {
// contains filtered or unexported fields
}
func (*Path2D) BezierCurveTo ¶
func (*Path2D) CommandBytes ¶
ID and CommandBytes are the internal bridge used by ctx2d. Applications normally only use the canvas-like path methods above.
func (*Path2D) ID ¶
ID and CommandBytes are the internal bridge used by ctx2d. Applications normally only use the canvas-like path methods above.
func (*Path2D) QuadraticCurveTo ¶
Click to show internal directories.
Click to hide internal directories.