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 ¶
- Variables
- type FrameBuffer
- func (fb *FrameBuffer) At(x, y int) color.Color
- func (fb *FrameBuffer) Bounds() image.Rectangle
- func (fb *FrameBuffer) Close() error
- func (fb *FrameBuffer) ColorModel() color.Model
- func (fb *FrameBuffer) Flush() error
- func (fb *FrameBuffer) Set(x, y int, c color.Color)
- func (fb *FrameBuffer) WritePixel(x, y int, r, g, b uint8)
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) Bounds ¶
func (fb *FrameBuffer) Bounds() image.Rectangle
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) WritePixel ¶
func (fb *FrameBuffer) WritePixel(x, y int, r, g, b uint8)
Click to show internal directories.
Click to hide internal directories.