Versions in this module Expand all Collapse all v0 v0.14.0 Aug 31, 2023 v0.13.0 May 12, 2023 v0.12.0 Sep 5, 2022 v0.11.0 Mar 17, 2022 v0.10.1 Jan 19, 2022 v0.10.0 Sep 27, 2021 v0.9.0 Mar 10, 2021 Changes in this version + func Formats() []string + func RegisterFormat(name string, fn func(w, h vg.Length) vg.CanvasWriterTo) v0.8.1 Nov 3, 2020 v0.8.0 Sep 4, 2020 Changes in this version + const PosBottom + const PosCenter + const PosLeft + const PosRight + const PosTop + type PlainTextHandler struct + func (hdlr PlainTextHandler) Box(txt string, fnt vg.Font) (width, height, depth vg.Length) + func (hdlr PlainTextHandler) Draw(c *Canvas, txt string, sty TextStyle, pt vg.Point) + type TextHandler interface + Box func(txt string, fnt vg.Font) (width, height, depth vg.Length) + Draw func(c *Canvas, txt string, sty TextStyle, pt vg.Point) type TextStyle + Handler TextHandler v0.7.0 Feb 27, 2020 Changes in this version + func NewFormattedCanvas(w, h vg.Length, format string) (vg.CanvasWriterTo, error) + type BoxGlyph struct + func (BoxGlyph) DrawGlyph(c *Canvas, sty GlyphStyle, pt vg.Point) + type Canvas struct + func Crop(c Canvas, left, right, bottom, top vg.Length) Canvas + func New(c vg.CanvasSizer) Canvas + func NewCanvas(c vg.Canvas, w, h vg.Length) Canvas + func (c *Canvas) Center() vg.Point + func (c *Canvas) ClipLinesX(lines ...[]vg.Point) (clipped [][]vg.Point) + func (c *Canvas) ClipLinesXY(lines ...[]vg.Point) [][]vg.Point + func (c *Canvas) ClipLinesY(lines ...[]vg.Point) (clipped [][]vg.Point) + func (c *Canvas) ClipPolygonX(pts []vg.Point) []vg.Point + func (c *Canvas) ClipPolygonXY(pts []vg.Point) []vg.Point + func (c *Canvas) ClipPolygonY(pts []vg.Point) []vg.Point + func (c *Canvas) Contains(p vg.Point) bool + func (c *Canvas) ContainsX(x vg.Length) bool + func (c *Canvas) ContainsY(y vg.Length) bool + func (c *Canvas) DrawGlyph(sty GlyphStyle, pt vg.Point) + func (c *Canvas) DrawGlyphNoClip(sty GlyphStyle, pt vg.Point) + func (c *Canvas) FillPolygon(clr color.Color, pts []vg.Point) + func (c *Canvas) FillText(sty TextStyle, pt vg.Point, txt string) + func (c *Canvas) SetLineStyle(sty LineStyle) + func (c *Canvas) StrokeLine2(sty LineStyle, x0, y0, x1, y1 vg.Length) + func (c *Canvas) StrokeLines(sty LineStyle, lines ...[]vg.Point) + func (c *Canvas) X(x float64) vg.Length + func (c *Canvas) Y(y float64) vg.Length + type CircleGlyph struct + func (CircleGlyph) DrawGlyph(c *Canvas, sty GlyphStyle, pt vg.Point) + type CrossGlyph struct + func (CrossGlyph) DrawGlyph(c *Canvas, sty GlyphStyle, pt vg.Point) + type GlyphDrawer interface + DrawGlyph func(*Canvas, GlyphStyle, vg.Point) + type GlyphStyle struct + Radius vg.Length + Shape GlyphDrawer + func (g GlyphStyle) Rectangle() vg.Rectangle + type LineStyle struct + Color color.Color + DashOffs vg.Length + Dashes []vg.Length + Width vg.Length + type PlusGlyph struct + func (PlusGlyph) DrawGlyph(c *Canvas, sty GlyphStyle, pt vg.Point) + type PyramidGlyph struct + func (PyramidGlyph) DrawGlyph(c *Canvas, sty GlyphStyle, pt vg.Point) + type RingGlyph struct + func (RingGlyph) DrawGlyph(c *Canvas, sty GlyphStyle, pt vg.Point) + type SquareGlyph struct + func (SquareGlyph) DrawGlyph(c *Canvas, sty GlyphStyle, pt vg.Point) + type TextStyle struct + Color color.Color + Font vg.Font + Rotation float64 + XAlign XAlignment + YAlign YAlignment + func (sty TextStyle) Height(txt string) vg.Length + func (sty TextStyle) Rectangle(txt string) vg.Rectangle + func (sty TextStyle) Width(txt string) (max vg.Length) + type Tiles struct + Cols int + PadBottom vg.Length + PadLeft vg.Length + PadRight vg.Length + PadTop vg.Length + PadX vg.Length + PadY vg.Length + Rows int + func (ts Tiles) At(c Canvas, x, y int) Canvas + type TriangleGlyph struct + func (TriangleGlyph) DrawGlyph(c *Canvas, sty GlyphStyle, pt vg.Point) + type XAlignment float64 + const XCenter + const XLeft + const XRight + type YAlignment float64 + const YBottom + const YCenter + const YTop