graphos

package module
v0.0.0-...-7f7c94c Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: MIT Imports: 5 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(x1, y1, x2, y2 int) int

func MergeColorCode

func MergeColorCode(b, f byte) byte

Types

type Instance

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

	ScreenHandler func(*Instance) error
	Title         string
	Font          struct {
		Height int
		Width  int
		Bitmap [][]byte
	}
	// contains filtered or unexported fields
}

func Get

func Get() *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 (p *Instance) Clear()

func (*Instance) DrawChar

func (p *Instance) DrawChar(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 (p *Instance) DrawPix(x, y int)

func (*Instance) Run

func (p *Instance) Run()

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