painter

package
v0.0.0-...-0dfcd91 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UpdateOp = updateOp{}

Functions

func BlackFill

func BlackFill(t screen.Texture, state *State)

func GreenFill

func GreenFill(t screen.Texture, state *State)

func Reset

func Reset(t screen.Texture, state *State)

func WhiteFill

func WhiteFill(t screen.Texture, state *State)

Types

type CommandList

type CommandList []Operation

func (CommandList) Do

func (ol CommandList) Do(t screen.Texture, state *State) (ready bool)

type Loop

type Loop struct {
	Receiver Receiver
	// contains filtered or unexported fields
}

func (*Loop) Post

func (l *Loop) Post(op Operation)

func (*Loop) Start

func (l *Loop) Start(s screen.Screen)

func (*Loop) StopAndWait

func (l *Loop) StopAndWait()

type Operation

type Operation interface {
	Do(t screen.Texture, state *State) (ready bool)
}

type OperationFunc

type OperationFunc func(t screen.Texture, state *State)

func DrawRectangle

func DrawRectangle(args []string) OperationFunc

func Figure

func Figure(args []string) OperationFunc

func Move

func Move(args []string) OperationFunc

func (OperationFunc) Do

func (f OperationFunc) Do(t screen.Texture, state *State) bool

type Receiver

type Receiver interface {
	Update(t screen.Texture)
}

Receiver отримує текстуру, яка була підготовлена в результаті виконання команд у циклі подій.

type State

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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