graphos

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2023 License: MIT Imports: 7 Imported by: 0

README

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Colors = []struct {
	R byte
	G byte
	B byte
}{
	{0, 0, 0},
	{0, 0, 170},
	{0, 170, 0},
	{0, 170, 170},
	{170, 0, 0},
	{170, 0, 170},
	{170, 85, 0},
	{170, 170, 170},
	{85, 85, 85},
	{85, 85, 255},
	{85, 255, 85},
	{85, 255, 255},
	{255, 85, 85},
	{255, 85, 255},
	{255, 255, 85},
	{255, 255, 255},
}

Functions

func Distance

func Distance(x0, y0, x1, y1 int) int

func DistanceManhattan

func DistanceManhattan(x0, y0, x1, y1 int) int

func Handler

func Handler()

func MergeColorCode

func MergeColorCode(b, f byte) byte

Types

type Instance

type Instance struct {
	Border       int
	Height       int
	Width        int
	Scale        float64
	CurrentColor byte
	UTime        uint64

	ScreenHandler func(*Instance) error
	Title         string

	Machine int

	Font struct {
		Height int
		Width  int
		Bitmap []byte
	}
	// contains filtered or unexported fields
}

func New

func New() *Instance

func (*Instance) Box

func (p *Instance) Box(x1, y1, x2, y2 int)

func (*Instance) Circle

func (p *Instance) Circle(x0, y0, radius int)

func (*Instance) Clear

func (i *Instance) Clear()

func (*Instance) Draw

func (i *Instance) Draw(screen *ebiten.Image)

func (*Instance) DrawChar

func (i *Instance) DrawChar(index, fgColor, bgColor byte, x, y int)

func (*Instance) DrawCursor

func (i *Instance) DrawCursor(index, fgColor, bgColor byte, x, y int)

func (*Instance) DrawFilledCircle

func (p *Instance) DrawFilledCircle(x0, y0, radius int)

func (*Instance) DrawLine

func (p *Instance) DrawLine(x0, y0, x1, y1 int)

func (*Instance) DrawPix

func (i *Instance) DrawPix(x, y int, color byte)

func (*Instance) DrawVideoTextMode

func (i *Instance) DrawVideoTextMode()

func (*Instance) Input

func (i *Instance) Input()

func (*Instance) Layout

func (i *Instance) Layout(outsideWidth, outsideHeight int) (int, int)

func (*Instance) Print

func (i *Instance) Print(msg string)

func (*Instance) Println

func (i *Instance) Println(msg string)

func (*Instance) PutChar

func (i *Instance) PutChar(c byte)

func (*Instance) Run

func (i *Instance) Run()

func (*Instance) Update

func (i *Instance) Update() error

func (*Instance) Write

func (i *Instance) Write(p []byte) (n int, err error)

Directories

Path Synopsis
examples
mst
Bitmap font Expert 1.1
Bitmap font Expert 1.1

Jump to

Keyboard shortcuts

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