framebuffer

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

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

Go to latest
Published: Oct 5, 2022 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FrameBuffer

type FrameBuffer struct {
	Buf      *[]byte
	Width    int
	Height   int
	Stride   int
	Rotation int // Can only be one of (0, 1, 2, 3)
}

Type FrameBuffer implements a framebuffer using the MHMSBFormat

func (*FrameBuffer) Circle

func (f *FrameBuffer) Circle(centerx, centery, radius, color int)

func (*FrameBuffer) Clear

func (f *FrameBuffer) Clear()

func (*FrameBuffer) DisplayImage

func (f *FrameBuffer) DisplayImage(imageWidth, imageHeight int, image []byte)

Rough implementation just for B/W

func (*FrameBuffer) Fill

func (f *FrameBuffer) Fill(color uint8)

func (*FrameBuffer) FillRect

func (f *FrameBuffer) FillRect(x, y, width, height int, color uint8)

func (*FrameBuffer) HLine

func (f *FrameBuffer) HLine(x, y, width int, color byte)

func (*FrameBuffer) Line

func (f *FrameBuffer) Line(x0, y0, x1, y1, color int)

func (*FrameBuffer) Pixel

func (f *FrameBuffer) Pixel(x, y int, color ...int) byte

Func Pixel will get the value of a pixel if you don't pass a color if you pass a color, Pixel will set the pixel to the provided color

func (*FrameBuffer) Rect

func (f *FrameBuffer) Rect(x, y, width, height int, color byte, fill bool)

func (*FrameBuffer) Scroll

func (f *FrameBuffer) Scroll(dx, dy int)

Func Scroll shifts the framebuffer in x and y direction

func (*FrameBuffer) SetRotation

func (f *FrameBuffer) SetRotation(val int) error

Func SetRotation sets the rotation of the framebuffer

func (*FrameBuffer) VLine

func (f *FrameBuffer) VLine(x, y, height int, color byte)

Jump to

Keyboard shortcuts

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