draw

package
v0.0.0-...-37f3e00 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DrawPoint

func DrawPoint(context DrawingContext, pixel base.PixelMember)

DrawPoint draws a single point on to the image.

Types

type CachePalette

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

func NewCachePalette

func NewCachePalette(iterateLimit uint8, member color.NRGBA, cacher Cacher) CachePalette

func (CachePalette) Color

func (palette CachePalette) Color(member base.EscapeValue) color.NRGBA

CachePalette implements Palette

type Cacher

type Cacher func(iterateLimit uint8, index uint8) color.NRGBA

type ContextProvider

type ContextProvider interface {
	DrawingContext() DrawingContext
}

type DrawingContext

type DrawingContext interface {
	Picture() *image.NRGBA
	Colors() Palette
}

type GrayscalePalette

type GrayscalePalette struct {
	CachePalette
}

type MockContextProvider

type MockContextProvider struct {
	TDrawingContext bool

	Context DrawingContext
}

func (*MockContextProvider) DrawingContext

func (mock *MockContextProvider) DrawingContext() DrawingContext

type MockDrawingContext

type MockDrawingContext struct {
	TPicture bool
	TColors  bool

	Pic *image.NRGBA
	Col Palette
}

func NewMockDrawingContext

func NewMockDrawingContext(iterateLimit uint8) *MockDrawingContext

func (*MockDrawingContext) Colors

func (mock *MockDrawingContext) Colors() Palette

func (*MockDrawingContext) Picture

func (mock *MockDrawingContext) Picture() *image.NRGBA

type MockPalette

type MockPalette struct {
	TColor bool
	Col    color.NRGBA
}

func (*MockPalette) Color

func (mock *MockPalette) Color(point base.EscapeValue) color.NRGBA

type Palette

type Palette interface {
	Color(point base.EscapeValue) color.NRGBA
}

func NewGrayscalePalette

func NewGrayscalePalette(iterateLimit uint8) Palette

func NewPrettyPalette

func NewPrettyPalette(iterateLimit uint8) Palette

func NewRedscalePalette

func NewRedscalePalette(iterateLimit uint8) Palette

type PaletteFactory

type PaletteFactory func(interateLimit uint8) Palette

type PrettyPalette

type PrettyPalette struct {
	CachePalette
}

type RedscalePalette

type RedscalePalette struct {
	CachePalette
}

Jump to

Keyboard shortcuts

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