vgeps

package
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2020 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const DPI = 72

DPI is the nominal resolution of drawing in EPS.

Variables

This section is empty.

Functions

This section is empty.

Types

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 vg.Font, 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL