primitives

package
v0.0.3-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2020 License: MIT Imports: 0 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Color

type Color struct {
	R, G, B, A uint8
}

type DefinedColors

type DefinedColors struct {
}

func Colors

func Colors() *DefinedColors

func (DefinedColors) White

func (_ DefinedColors) White() Color

type Dimensions

type Dimensions struct {
	Width, Height int
}

Dimensions defines a width and a height of an entity

func (*Dimensions) ToDimensionsF

func (dimensions *Dimensions) ToDimensionsF() DimensionsF

type DimensionsF

type DimensionsF struct {
	Width, Height float32
}

Dimensions defines a width and a height of an entity usinf floating point numbers

type KeyType

type KeyType int

KeyType defines a keyboards key

const (
	KeyA KeyType = iota
	KeyB
	KeyC
	KeyD
	KeyE
	KeyF
	KeyG
	KeyH
	KeyI
	KeyJ
	KeyK
	KeyL
	KeyM
	KeyN
	KeyO
	KeyP
	KeyQ
	KeyR
	KeyS
	KeyT
	KeyU
	KeyV
	KeyW
	KeyX
	KeyY
	KeyZ
	KeyUp
	KeyDown
	KeyLeft
	KeyRight
	Key0
	Key1
	Key2
	Key3
	Key4
	Key5
	Key6
	Key7
	Key8
	Key9
	KeyLeftCtrl
	KeyRightCtrl
	KeyLeftAlt
	KeyRightAlt
	KeySpace
	KeyReturn
	KeyEsc
	KeyBackslash
	KeyBackspace
	KeyCapslock
	KeyComma
	KeyDelete
	KeyEnd
	KeyEquals
	KeyF1
	KeyF2
	KeyF3
	KeyF4
	KeyF5
	KeyF6
	KeyF7
	KeyF8
	KeyF9
	KeyF10
	KeyF11
	KeyF12
	KeyF13
	KeyHome
	KeyInsert
	KeyNum0
	KeyNum1
	KeyNum2
	KeyNum3
	KeyNum4
	KeyNum5
	KeyNum6
	KeyNum7
	KeyNum8
	KeyNum9
	KeyPageDown
	KeyPageUp
	KeyPause
	KeyPeriod
	KeyRightBracket
	KeyLeftBracket
	KeySemicolon
	KeySlash
	KeyTab
)

type Point

type Point struct {
	X, Y int
}

type PointF

type PointF struct {
	X, Y float32
}

type Rectangle

type Rectangle struct {
	Point
	Dimensions
}

type RectangleF

type RectangleF struct {
	PointF
	DimensionsF
}

Jump to

Keyboard shortcuts

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