framebuffer

package module
v0.0.0-...-5032550 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2021 License: ISC Imports: 6 Imported by: 0

README

A dead simple go library for interacting with the linux framebuffer (implements image/draw.Image). Probably not ready for anything production-y; was just a late night diversion.

Documentation

Overview

An image/draw compatible interface to the linux framebuffer

Use Open() to get a framebuffer object, draw on it using the facilities of image/draw, and call its Flush() method to sync changes to the display.

Index

Constants

This section is empty.

Variables

View Source
var (
	InitErr = errors.New("Error initializing framebuffer")
)

Functions

This section is empty.

Types

type FrameBuffer

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

A framebuffer object. Obtain with Open() - the zero value is not useful. call Close() when finished to close the underlying file descriptor.

func Open

func Open(filename string) (*FrameBuffer, error)

Opens/initializes the framebuffer with device node located at <filename>.

func (*FrameBuffer) At

func (fb *FrameBuffer) At(x, y int) color.Color

func (*FrameBuffer) Bounds

func (fb *FrameBuffer) Bounds() image.Rectangle

func (*FrameBuffer) Close

func (fb *FrameBuffer) Close() error

Closes the framebuffer

func (*FrameBuffer) ColorModel

func (fb *FrameBuffer) ColorModel() color.Model

func (*FrameBuffer) Flush

func (fb *FrameBuffer) Flush() error

Sync changes to video memory - nothing will actually appear on the screen until this is called.

func (*FrameBuffer) Set

func (fb *FrameBuffer) Set(x, y int, c color.Color)

func (*FrameBuffer) WritePixel

func (fb *FrameBuffer) WritePixel(x, y int, r, g, b uint8)

Directories

Path Synopsis
A simple utilty to dispaly an image from stdin (png or jpeg) on the linux framebuffer.
A simple utilty to dispaly an image from stdin (png or jpeg) on the linux framebuffer.

Jump to

Keyboard shortcuts

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