asciiart

package
v0.0.0-...-92103ec Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagUp int = 1 << iota
	FlagDown
	FlagLeft
	FlagRight
)

ASCII character connection directions.

Variables

This section is empty.

Functions

func Process

func Process(data string) string

Process converts the input data to output string replacing ASCII graphics with the corresponding ASCII Box-drawing characters.

Types

type Region

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

Region defines an ASCII art region.

func NewRegion

func NewRegion(input []byte) *Region

NewRegion creates a region of the input data.

func (*Region) Clone

func (r *Region) Clone() *Region

Clone creates a copy of the region.

func (*Region) Get

func (r *Region) Get(row, col int) rune

Get the rune from the specified coordinate.

func (*Region) Height

func (r *Region) Height() int

Height returns the width of the region in rows.

func (*Region) Set

func (r *Region) Set(row, col int, ch rune)

Set the run in the specified coordinate.

func (*Region) String

func (r *Region) String() string

func (*Region) Width

func (r *Region) Width() int

Width returns the width of the region in characters.

Jump to

Keyboard shortcuts

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