draw2dgl

package
v0.0.0-...-a53a016 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2015 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const M16 uint32 = 1<<16 - 1

Variables

This section is empty.

Functions

This section is empty.

Types

type GLPainter

type GLPainter struct {
	// The Porter-Duff composition operator.
	Op draw.Op
	// contains filtered or unexported fields
}

func NewGLPainter

func NewGLPainter() *GLPainter

NewRGBAPainter creates a new RGBAPainter for the given image.

func (*GLPainter) Flush

func (p *GLPainter) Flush()

func (*GLPainter) Paint

func (p *GLPainter) Paint(ss []raster.Span, done bool)

Paint satisfies the Painter interface by painting ss onto an image.RGBA.

func (*GLPainter) SetColor

func (p *GLPainter) SetColor(c color.Color)

SetColor sets the color to paint the spans.

type GLVertex

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

func NewGLVertex

func NewGLVertex() *GLVertex

func (*GLVertex) NextCommand

func (glVertex *GLVertex) NextCommand(cmd draw2d.VertexCommand)

func (*GLVertex) Vertex

func (glVertex *GLVertex) Vertex(x, y float64)

type GraphicContext

type GraphicContext struct {
	*draw2d.StackGraphicContext
	// contains filtered or unexported fields
}

func NewGraphicContext

func NewGraphicContext(width, height int) *GraphicContext

*

  • Create a new Graphic context from an image

func (*GraphicContext) Clear

func (gc *GraphicContext) Clear()

func (*GraphicContext) ClearRect

func (gc *GraphicContext) ClearRect(x1, y1, x2, y2 int)

func (*GraphicContext) DrawImage

func (gc *GraphicContext) DrawImage(img image.Image)

func (*GraphicContext) Fill

func (gc *GraphicContext) Fill(paths ...*draw2d.PathStorage)

func (*GraphicContext) FillString

func (gc *GraphicContext) FillString(text string) (cursor float64)

func (*GraphicContext) FillStroke

func (gc *GraphicContext) FillStroke(paths ...*draw2d.PathStorage)

func (*GraphicContext) GetDPI

func (gc *GraphicContext) GetDPI() int

func (*GraphicContext) SetDPI

func (gc *GraphicContext) SetDPI(dpi int)

func (*GraphicContext) Stroke

func (gc *GraphicContext) Stroke(paths ...*draw2d.PathStorage)

Jump to

Keyboard shortcuts

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