graphics

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArrowCell

type ArrowCell bool

func (ArrowCell) IsCell

func (c ArrowCell) IsCell() bool

type Cell

type Cell interface {
	IsCell() bool
}

type CellStack

type CellStack []*TaggedCell

func (*CellStack) Is

func (cs *CellStack) Is(key string, value string) bool

func (*CellStack) Match

func (cs *CellStack) Match(tags map[string]string) bool

func (*CellStack) PlaceArrow

func (cs *CellStack) PlaceArrow(inverted bool) *TaggedCell

func (*CellStack) PlaceChar

func (cs *CellStack) PlaceChar(char rune) *TaggedCell

func (*CellStack) PlaceEmpty

func (cs *CellStack) PlaceEmpty() *TaggedCell

func (*CellStack) Render

func (cs *CellStack) Render(
	priorityTags map[string]string,
) rune

func (*CellStack) Tag

func (cs *CellStack) Tag(key string) string

func (*CellStack) Tags

func (cs *CellStack) Tags() map[string]string

type CharCell

type CharCell rune

func (CharCell) IsCell

func (c CharCell) IsCell() bool

type EmptyCell

type EmptyCell bool

func (EmptyCell) IsCell

func (c EmptyCell) IsCell() bool

type LineStack

type LineStack []*LinesCell

func (*LineStack) Render

func (l *LineStack) Render() rune

type LineTracer

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

func NewLineTracer

func NewLineTracer(start utils.Vector) *LineTracer

func (*LineTracer) Dump

func (l *LineTracer) Dump(matrix *Matrix) error

func (*LineTracer) MoveHorizontal

func (l *LineTracer) MoveHorizontal(reverse bool) utils.Vector

func (*LineTracer) MoveVertical

func (l *LineTracer) MoveVertical(reverse bool) utils.Vector

func (*LineTracer) WithTags

func (l *LineTracer) WithTags(tags map[string]string) *LineTracer

type LinesCell

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

func (*LinesCell) IsCell

func (l *LinesCell) IsCell() bool

type Matrix

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

func NewMatrix

func NewMatrix(w int, h int) *Matrix

func (*Matrix) Cell

func (m *Matrix) Cell(v utils.Vector) *CellStack

func (*Matrix) Cells

func (m *Matrix) Cells() [][]CellStack

func (*Matrix) ExpandRight

func (m *Matrix) ExpandRight(n int)

func (*Matrix) H

func (m *Matrix) H() int

func (*Matrix) RayCastVertical

func (m *Matrix) RayCastVertical(
	origin utils.Vector,
	query map[string]func(string) bool,
	length int,
) (bool, error)

func (*Matrix) Render

func (m *Matrix) Render() string

func (*Matrix) W

func (m *Matrix) W() int

type TaggedCell

type TaggedCell struct {
	Cell
	// contains filtered or unexported fields
}

func NewTaggedCell

func NewTaggedCell(cell Cell) *TaggedCell

func (*TaggedCell) Is

func (tc *TaggedCell) Is(key string, value string) bool

func (*TaggedCell) Match

func (tc *TaggedCell) Match(tags map[string]string) bool

func (*TaggedCell) Tag

func (tc *TaggedCell) Tag(key string) string

func (*TaggedCell) WithTag

func (tc *TaggedCell) WithTag(key string, value string) *TaggedCell

func (*TaggedCell) WithTags

func (tc *TaggedCell) WithTags(tags map[string]string) *TaggedCell

Jump to

Keyboard shortcuts

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