image

package
v0.0.0-...-e3230a5 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultSize = 4000

Variables

View Source
var (
	PNGFormat = ImageFormat{"png", "PNG", "png"}
	SVGFormat = ImageFormat{"svg", "SVG", "svg"}
)

Functions

func ConvertSvgToBinary

func ConvertSvgToBinary(svgData []byte, format ImageFormat, size uint) ([]byte, error)

func Destroy

func Destroy()

func DisplayImage

func DisplayImage(ctx context.Context, screen termbox.Screen, imgData io.Reader, title string)

func DrawImgToScreen

func DrawImgToScreen(screen termbox.Screen, img image.Image)

func DrawText

func DrawText(s termbox.Screen, x, y int, text string)

func DrawTextBottom

func DrawTextBottom(s termbox.Screen, text string)

func Init

func Init()

Types

type ImageFormat

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

func (ImageFormat) AsLower

func (i ImageFormat) AsLower() string

func (ImageFormat) AsUpper

func (i ImageFormat) AsUpper() string

Jump to

Keyboard shortcuts

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