Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Animate ¶
func Animate(app *view.Application)
Animate triggers the application to redraw every 50ms
func FromFile ¶
FromFile is a convenience function that converts a file on disk to a formatted string. See FromImage() for more details.
func FromImage ¶
FromImage is the primary function of this package, It takes an image.Image and converts it to a string formatted for view. The unicode half-block character (▀) with a fg & bg colour set will represent pixels in the returned string. Because each character represents two pixels, it is not possible to convert an image if its height is uneven. Attempts to do so will return an error.
Types ¶
type GifView ¶
GifView is a box which displays animated gifs via Omnikron13's pixelview dynamic color rendering. It automatically draws the right frame based on time elapsed since creation. You can trigger re-drawing by executing Animate(view.Application) in a goroutine.
func GifFromImage ¶
GifFromImage creates a new GifView from a GIF Image
func GifFromImagePath ¶
GifFromImagePath creates a new GifView from a file on disk
func (*GifView) Draw ¶
func (g *GifView) Draw(screen tcell.Screen)
Draw renders the current frame of the GIF
func (*GifView) GetCurrentFrame ¶
GetCurrentFrame returns the current frame the GIF is on