image

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Compose = copyFunc(func(g emu.Glyph) bool {
	return g.Char == ' ' && g.BG == emu.DefaultBG
})

Compose is like Copy does not overwrite a cell in dst if a cell in src is empty and has the default background.

View Source
var Copy = copyFunc(func(g emu.Glyph) bool {
	return g.Transparent()
})

Copy the cell contents from src to dst starting at [dstRow, dstCol], TODO(cfoust): 07/25/24 this is misleading, Copy should not have this transparency behavior, it should be in another function

View Source
var CopyRaw = copyFunc(func(g emu.Glyph) bool {
	return false
})

CopyRaw copies all cells regardless of transparency.

Functions

This section is empty.

Types

type Image

type Image []emu.Line

An Image is a simple buffer of terminal state.

func Capture

func Capture(view emu.View) Image

func New

func New(size geom.Vec2) Image

func (Image) Cell

func (i Image) Cell(x, y int) emu.Glyph

func (Image) Clear added in v0.1.5

func (i Image) Clear(region geom.Rect)

func (Image) Clone

func (i Image) Clone() Image

func (Image) Size

func (i Image) Size() geom.Vec2

Jump to

Keyboard shortcuts

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