base

package
v0.0.0-...-8e656ca Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2014 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	I_A = 3
	I_R = 2
	I_G = 1
	I_B = 0
)

Variables

This section is empty.

Functions

func GenerateId

func GenerateId() uint64

Types

type Element

type Element struct {
	Id             uint64
	InvMsgPipe     chan int64
	X              int
	Y              int
	Width          int
	Height         int
	ScreenX        int
	ScreenY        int
	Buffer         []byte
	DeactivateHndr func()
	Children       *list.List
	CompRemoveHdnr func(uint64)
	Font           *truetype.Font
}

func (*Element) At

func (e *Element) At(x, y int) color.Color

func (*Element) Bounds

func (e *Element) Bounds() image.Rectangle

func (*Element) ColorModel

func (e *Element) ColorModel() color.Model

func (*Element) GetId

func (e *Element) GetId() uint64

func (*Element) Set

func (e *Element) Set(x, y int, c color.Color)

func (*Element) UpdateScreenX

func (e *Element) UpdateScreenX(deltaX int)

func (*Element) UpdateScreenY

func (e *Element) UpdateScreenY(deltaY int)

type IElement

type IElement interface {
	UpdateScreenX(int)
	UpdateScreenY(int)

	ColorModel() color.Model
	Bounds() image.Rectangle
	At(x, y int) color.Color
	Set(x, y int, c color.Color)

	Mouse(int, int, int, int, uint16)
	Draw()

	GetId() uint64
}

Jump to

Keyboard shortcuts

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