plot: github.com/sksullivan/plot/vg/vgx11 Index | Files

package vgx11

import "github.com/sksullivan/plot/vg/vgx11"

Package vgx11 implements X-Window vg support.

Index

Package Files

canvas.go painter.go

type Canvas Uses

type Canvas struct {
    *vgimg.Canvas
    // contains filtered or unexported fields
}

Canvas implements the vg.Canvas interface, drawing to an image.Image using draw2d.

func New Uses

func New(width, height vg.Length, name string) (*Canvas, error)

New returns a new image canvas with the size specified rounded up to the nearest pixel.

func NewImage Uses

func NewImage(img draw.Image, name string) (*Canvas, error)

NewImage returns a new image canvas that draws to the given image. The minimum point of the given image should probably be 0,0.

func (*Canvas) Paint Uses

func (c *Canvas) Paint()

type Painter Uses

type Painter struct {
    // The image to compose onto.
    Image *xgraphics.Image
    // The Porter-Duff composition operator.
    Op  draw.Op
    // contains filtered or unexported fields
}

func NewPainter Uses

func NewPainter(img *xgraphics.Image) *Painter

NewPainter creates a new Painter for the given image.

func (*Painter) Paint Uses

func (r *Painter) Paint(ss []raster.Span, done bool)

Paint satisfies the Painter interface by painting ss onto an xgraphics.Image.

func (*Painter) SetColor Uses

func (r *Painter) SetColor(c color.Color)

SetColor sets the color to paint the spans.

Package vgx11 imports 12 packages (graph). Updated 2016-08-04. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).