...

Package vgeps

import "gonum.org/v1/plot/vg/vgeps"
Overview
Index

Overview ▾

Package vgeps implements the vg.Canvas interface using encapsulated postscript.

Constants

DPI is the nominal resolution of drawing in EPS.

const DPI = 72

type Canvas

type Canvas struct {
    // contains filtered or unexported fields
}

func New

func New(w, h vg.Length) *Canvas

New returns a new Canvas.

func NewTitle

func NewTitle(w, h vg.Length, title string) *Canvas

NewTitle returns a new Canvas with the given title string.

func (*Canvas) DrawImage

func (c *Canvas) DrawImage(rect vg.Rectangle, img image.Image)

DrawImage implements the vg.Canvas.DrawImage method.

func (*Canvas) Fill

func (e *Canvas) Fill(path vg.Path)

func (*Canvas) FillString

func (e *Canvas) FillString(fnt font.Face, pt vg.Point, str string)

func (*Canvas) Pop

func (e *Canvas) Pop()

func (*Canvas) Push

func (e *Canvas) Push()

func (*Canvas) Rotate

func (e *Canvas) Rotate(r float64)

func (*Canvas) Scale

func (e *Canvas) Scale(x, y float64)

func (*Canvas) SetColor

func (e *Canvas) SetColor(c color.Color)

func (*Canvas) SetLineDash

func (e *Canvas) SetLineDash(dashes []vg.Length, o vg.Length)

func (*Canvas) SetLineWidth

func (e *Canvas) SetLineWidth(w vg.Length)

func (*Canvas) Size

func (c *Canvas) Size() (w, h vg.Length)

func (*Canvas) Stroke

func (e *Canvas) Stroke(path vg.Path)

func (*Canvas) Translate

func (e *Canvas) Translate(pt vg.Point)

func (*Canvas) WriteTo

func (e *Canvas) WriteTo(w io.Writer) (int64, error)

WriteTo writes the canvas to an io.Writer.