char

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CharacterApostrophe = Char{
	PaintChar: '▓',
	Shade:     '░',
	Coordinates: []Coordinates{
		{0, 0, 2},
		{0, 1, 1},
	},
	Next: 0,
}
View Source
var CharacterG = Char{
	PaintChar: '▓',
	Shade:     '░',
	Coordinates: []Coordinates{
		{5, 1, 6},
		{3, 2, 2},
		{10, 2, 3},
		{2, 3, 2},
		{1, 4, 2},
		{0, 5, 2},
		{0, 6, 2},
		{0, 7, 2},
		{4, 9, 7},
		{10, 6, 5},
		{12, 7, 2},
		{11, 8, 3},
		{2, 8, 2},
	},
	Next: 17,
}
View Source
var CharacterL = Char{
	PaintChar: '▓',
	Shade:     '░',
	Coordinates: []Coordinates{
		{0, 1, 3},
		{2, 2, 2},
		{2, 3, 2},
		{2, 4, 2},
		{2, 5, 2},
		{2, 6, 2},
		{2, 7, 2},
		{2, 8, 2},
		{3, 9, 3},
	},
	Next: 8,
}
View Source
var CharacterO = Char{
	PaintChar: '▓',
	Shade:     '░',
	Coordinates: []Coordinates{
		{3, 4, 5},

		{1, 5, 2},
		{0, 6, 2},
		{0, 7, 2},
		{1, 8, 2},

		{8, 5, 2},
		{9, 6, 2},
		{9, 7, 2},
		{8, 8, 2},

		{3, 9, 5},
	},
	Next: 13,
}
View Source
var CharacterRevG = Char{
	PaintChar: '▓',
	Shade:     '░',
	Coordinates: []Coordinates{
		{4, 1, 6},
		{2, 2, 3},
		{0, 6, 5},
		{1, 7, 2},
		{1, 8, 3},
		{4, 9, 7},
		{10, 2, 2},
		{11, 3, 2},
		{12, 4, 2},
		{13, 5, 2},
		{13, 6, 2},
		{13, 7, 2},
		{11, 8, 2},
	},
	Next: 17,
}

Functions

This section is empty.

Types

type Canvas

type Canvas struct {
	Width        int
	Height       int
	PaintChar    rune
	Word         []Char
	CanvasBorder CanvasBorder
}

func NewCanvas

func NewCanvas() *Canvas

func (*Canvas) BlankCanvas

func (c *Canvas) BlankCanvas() [][]rune

func (*Canvas) BlankCanvasAsString

func (c *Canvas) BlankCanvasAsString() string

func (*Canvas) PrintCanvas

func (c *Canvas) PrintCanvas() [][]rune

func (*Canvas) PrintCanvasAsString

func (c *Canvas) PrintCanvasAsString() string

func (*Canvas) WithDimensions

func (c *Canvas) WithDimensions(width, height int) *Canvas

func (*Canvas) WithPaintChar

func (c *Canvas) WithPaintChar(r rune, border CanvasBorder) *Canvas

func (*Canvas) WithWord

func (c *Canvas) WithWord(word ...Char) *Canvas

type CanvasBorder

type CanvasBorder struct {
	TopBorderChar         rune
	BottomBorderChar      rune
	LeftBorderChar        rune
	RightBorderChar       rune
	TopLeftCornerChar     rune
	TopRightCornerChar    rune
	BottomLeftCornerChar  rune
	BottomRightCornerChar rune
}

type Char

type Char struct {
	Coordinates []Coordinates
	Next        int
	PaintChar   rune
	Shade       rune
}

func (*Char) GetWidth

func (c *Char) GetWidth() int

type Coordinates

type Coordinates struct {
	X int
	Y int
	L int
}

Jump to

Keyboard shortcuts

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