cursors

package
v0.0.0-...-b84321f Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Colors = []BitColor{R_Bit, G_Bit, B_Bit}
)

Functions

func CursorAdapter

func CursorAdapter(c Cursor) io.ReadWriteSeeker

Types

type BitColor

type BitColor uint
const (
	NONE  BitColor = iota
	R_Bit BitColor = 0x1
	G_Bit BitColor = 0x2
	B_Bit BitColor = 0x4
)

type Cursor

type Cursor interface {
	Seek(offset int64, whence int) (int64, error)
	WriteBit(bit uint8) (uint, error)
	ReadBit() (uint8, error)
}

func CipherMiddleware

func CipherMiddleware(c Cursor, block cipher.StreamCipherBlock) Cursor

type Option

type Option func(*RNGCursor)

func UseBlueBit

func UseBlueBit() Option

func UseGreenBit

func UseGreenBit() Option

func WithSeed

func WithSeed(seed int64) Option

type RNGCursor

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

func NewRNGCursor

func NewRNGCursor(img draw.Image, options ...Option) *RNGCursor

func (*RNGCursor) ReadBit

func (c *RNGCursor) ReadBit() (uint8, error)

func (*RNGCursor) Seek

func (c *RNGCursor) Seek(n int64, whence int) (int64, error)

func (*RNGCursor) WriteBit

func (c *RNGCursor) WriteBit(bit uint8) (uint, error)

Jump to

Keyboard shortcuts

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