braille

package
v0.0.0-...-e2c65c2 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package braille composites bitmaps as braille.

Index

Constants

This section is empty.

Variables

View Source
var Margin = image.Point{1, 2}

Margin is the typical margin of skipped bits necessary to make Braille line art look straight. Pass as the margin argument to DrawBitmap.

Functions

func BitmapAt

func BitmapAt(src *bitmap.Bitmap, sp image.Point) string

BitmapAt returns the braille glyph that coresponds to the 2x4 grid at the given point in a bitmap.

func Bounds

Bounds takes a rectangle describing cells on a display to the cells of a braille bitmap covering the cells of the display. Accepts a margin, bits to skip over between cells. Passing braille.Margin drops some pixels to achieve the possibility of rendering straighter lines. Passing image.ZP covers every bit of the bitmap, though all readable fonts will draw a margin between braille characters.

func DrawBitmap

func DrawBitmap(dst *display.Display, r image.Rectangle, src *bitmap.Bitmap, sp image.Point, m image.Point, fg color.Color)

DrawBitmap draws a braille bitmap onto a display, setting the foreground color for any cells with a prsent braille character. Skips over pixels in the given margin between cells. Passing braille.Margin drops pixels between cells to preserve the appearance of straight lines. Passing image.ZP preserves the entire image, but will render discontinuities in the margin between cells.

Types

This section is empty.

Jump to

Keyboard shortcuts

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