textemulator

package
v0.0.0-...-59786a1 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultPalette = color.Palette{
	color.RGBA{R: 0x00, G: 0x00, B: 0x00, A: 0xff},
	color.RGBA{R: 0x11, G: 0x08, B: 0x00, A: 0xff},
	color.RGBA{R: 0x22, G: 0x11, B: 0x00, A: 0xff},
	color.RGBA{R: 0x33, G: 0x19, B: 0x00, A: 0xff},
	color.RGBA{R: 0x44, G: 0x22, B: 0x00, A: 0xff},
	color.RGBA{R: 0x55, G: 0x2a, B: 0x00, A: 0xff},
	color.RGBA{R: 0x66, G: 0x33, B: 0x00, A: 0xff},
	color.RGBA{R: 0x77, G: 0x3b, B: 0x00, A: 0xff},
	color.RGBA{R: 0x88, G: 0x44, B: 0x00, A: 0xff},
	color.RGBA{R: 0x99, G: 0x4c, B: 0x00, A: 0xff},
	color.RGBA{R: 0xaa, G: 0x55, B: 0x00, A: 0xff},
	color.RGBA{R: 0xbb, G: 0x5d, B: 0x00, A: 0xff},
	color.RGBA{R: 0xcc, G: 0x66, B: 0x00, A: 0xff},
	color.RGBA{R: 0xdd, G: 0x6e, B: 0x00, A: 0xff},
	color.RGBA{R: 0xee, G: 0x77, B: 0x00, A: 0xff},
	color.RGBA{R: 0xff, G: 0x7f, B: 0x00, A: 0xff},
}

Functions

This section is empty.

Types

type Emulator

type Emulator struct {
	Palette color.Palette
	Title   string
	// contains filtered or unexported fields
}

func New

func New(w, h int) (*Emulator, error)

func (*Emulator) Apply

func (emu *Emulator) Apply(colors []color.Color) error

func (*Emulator) At

func (emu *Emulator) At(position int) color.Color

func (*Emulator) Close

func (emu *Emulator) Close() error

func (*Emulator) Geometry

func (emu *Emulator) Geometry() (width, height int)

func (*Emulator) Render

func (emu *Emulator) Render() error

func (*Emulator) Set

func (emu *Emulator) Set(position int, c color.Color)

Jump to

Keyboard shortcuts

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