gfx

package
v1.0.260758 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package gfx converts RGBA images to truecolor half-block cell grids.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeHalfBlock

func EncodeHalfBlock(img image.Image, cols, rows, offX, offY int) []cell.Cell

EncodeHalfBlock maps an image into a cols×rows cell grid. Each cell covers 1×2 image samples (top=bg, bottom=fg) using '▄'. offX/offY are source pixel offsets for panning.

func EncodeHalfBlockFit

func EncodeHalfBlockFit(img image.Image, cols, rows int, fit string, offX, offY int) []cell.Cell

EncodeHalfBlockFit encodes with fit mode: cover | contain | stretch.

func SolidImage

func SolidImage(w, h int) image.Image

SolidImage creates a simple gradient test image.

Types

This section is empty.

Jump to

Keyboard shortcuts

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