vgpdf

package
v0.0.0-...-7c6133f Latest Latest
Warning

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

Go to latest
Published: May 30, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

The vgpdf implemens the vg.Canvas interface using gopdf (bitbucket.org/zombiezen/gopdf/pdf).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Canvas

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

Canvas implements the vg.Canvas interface, drawing to a PDF.

func New

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

New creates a new PDF Canvas.

func (*Canvas) DPI

func (*Canvas) DPI() float64

func (*Canvas) Fill

func (c *Canvas) Fill(p vg.Path)

func (*Canvas) FillString

func (c *Canvas) FillString(fnt vg.Font, x, y vg.Length, str string)

func (*Canvas) Pop

func (c *Canvas) Pop()

func (*Canvas) Push

func (c *Canvas) Push()

func (*Canvas) Rotate

func (c *Canvas) Rotate(r float64)

func (*Canvas) Scale

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

func (*Canvas) SetColor

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

func (*Canvas) SetLineDash

func (c *Canvas) SetLineDash(dashes []vg.Length, offs vg.Length)

func (*Canvas) SetLineWidth

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

func (*Canvas) Size

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

func (*Canvas) Stroke

func (c *Canvas) Stroke(p vg.Path)

func (*Canvas) Translate

func (c *Canvas) Translate(x vg.Length, y vg.Length)

func (*Canvas) WriteTo

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

WriteTo writes the Canvas to an io.Writer. After calling Write, the canvas is closed and may no longer be used for drawing.

Jump to

Keyboard shortcuts

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