Versions in this module Expand all Collapse all v0 v0.1.0 Aug 21, 2018 Changes in this version + var ZP = Point — js/wasm + var ZR = Rectangle — js/wasm + type Canvas struct — js/wasm + func New(elem js.Value) (*Canvas, error) + func (c *Canvas) Clear(r Rectangle) + func (c *Canvas) Height() float64 + func (c *Canvas) MeasureText(text string) (tm TextMetrics) + func (c *Canvas) Path(p func(*PathBuilder)) Object + func (c *Canvas) Rect(r Rectangle) Object + func (c *Canvas) Text(text string, mw float64) Object + func (c *Canvas) Width() float64 + type Font struct — js/wasm + Name string + Size int + func (f Font) String() string + type LineCap int — js/wasm + const ButtCap + const RoundCap + const SquareCap + func (lc LineCap) String() string + type LineJoin int — js/wasm + const BevelJoin + const MiterJoin + const RoundJoin + func (lj LineJoin) String() string + type Object interface — js/wasm + Fill func(Point) + SetLineCap func(LineCap) + SetLineDash func([]float64) + SetLineJoin func(LineJoin) + SetLineWidth func(float64) + SetMiterLimit func(float64) + Stroke func(Point) + type PathBuilder struct — js/wasm + func (pb PathBuilder) Arc(c Point, r float64, sa, ea float64, cc bool) + func (pb PathBuilder) Bezier(cp1, cp2, end Point) + func (pb PathBuilder) Line(p Point) + func (pb PathBuilder) MoveTo(p Point) + func (pb PathBuilder) Quadratic(cp, end Point) + func (pb PathBuilder) Rect(r Rectangle) + type Point struct — js/wasm + X float64 + Y float64 + func Pt(x, y float64) Point + type Rectangle struct — js/wasm + Max Point + Min Point + func Rect(x1, y1, x2, y2 float64) Rectangle + func (r Rectangle) Canon() Rectangle + func (r Rectangle) Dx() float64 + func (r Rectangle) Dy() float64 + type TextMetrics struct — js/wasm + func (tm TextMetrics) ActualBoundingBoxAscent() float64 + func (tm TextMetrics) ActualBoundingBoxDescent() float64 + func (tm TextMetrics) ActualBoundingBoxLeft() float64 + func (tm TextMetrics) ActualBoundingBoxRight() float64 + func (tm TextMetrics) AlphabeticBaseline() float64 + func (tm TextMetrics) EmHeightAscent() float64 + func (tm TextMetrics) EmHeightDescent() float64 + func (tm TextMetrics) FontBoundingBoxAscent() float64 + func (tm TextMetrics) FontBoundingBoxDescent() float64 + func (tm TextMetrics) HangingBaseline() float64 + func (tm TextMetrics) IdeographicBaseline() float64 + func (tm TextMetrics) Width() float64